mirror of
https://github.com/juanfont/headscale.git
synced 2026-09-19 06:44:58 +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:
committed by
Kristoffer Dalby
parent
2c76d5c5b7
commit
77caa94400
@@ -2850,7 +2850,7 @@ func (p SSHCheckPeriod) MarshalJSON() ([]byte, error) {
|
|||||||
|
|
||||||
// Validate rejects negative durations and anything above the inclusive
|
// Validate rejects negative durations and anything above the inclusive
|
||||||
// 168h max.
|
// 168h max.
|
||||||
func (p *SSHCheckPeriod) Validate() error {
|
func (p SSHCheckPeriod) Validate() error {
|
||||||
if p.Always {
|
if p.Always {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user