MCPcopy Create free account
hub / github.com/jetkvm/kvm / Validate

Method Validate

config.go:47–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47func (s *KeyboardMacroStep) Validate() error {
48 if len(s.Keys) > MaxKeysPerStep {
49 return fmt.Errorf("too many keys in step (max %d)", MaxKeysPerStep)
50 }
51
52 if s.Delay < MinStepDelay {
53 s.Delay = MinStepDelay
54 } else if s.Delay > MaxStepDelay {
55 s.Delay = MaxStepDelay
56 }
57
58 return nil
59}
60
61type KeyboardMacro struct {
62 ID string `json:"id"`

Callers

nothing calls this directly

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected