mirror of
https://github.com/juanfont/headscale.git
synced 2026-10-24 23:36:49 +09:00
policy/v2: use value receiver for SSHCheckPeriod.Validate
recvcheck ignores UnmarshalJSON, so the pointer receiver here was the odd one out against value-receiver MarshalJSON. Validate only reads.
This commit is contained in:
1 parent
2c76d5c5b7
commit
77caa94400
1 file changed
+1
-1
@@ -2850,7 +2850,7 @@ func (p SSHCheckPeriod) MarshalJSON() ([]byte, error) {
|
||||
|
||||
// Validate rejects negative durations and anything above the inclusive
|
||||
// 168h max.
|
||||
func (p *SSHCheckPeriod) Validate() error {
|
||||
func (p SSHCheckPeriod) Validate() error {
|
||||
if p.Always {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user