MCPcopy Index your code
hub / github.com/coder/coder / ValidateSSHConfigOptions

Function ValidateSSHConfigOptions

codersdk/deployment.go:766–781  ·  view source on GitHub ↗

ValidateSSHConfigOptions validates deployment SSH settings before they are written to users' local SSH configs.

(options map[string]string)

Source from the content-addressed store, hash-verified

764// ValidateSSHConfigOptions validates deployment SSH settings before they are
765// written to users' local SSH configs.
766func ValidateSSHConfigOptions(options map[string]string) error {
767 // Sort the keys so that, when several options are invalid, the surfaced
768 // error is deterministic across restarts rather than dependent on map
769 // iteration order.
770 keys := make([]string, 0, len(options))
771 for key := range options {
772 keys = append(keys, key)
773 }
774 slices.Sort(keys)
775 for _, key := range keys {
776 if err := ValidateSSHConfigOption(key, options[key]); err != nil {
777 return err
778 }
779 }
780 return nil
781}
782
783// ValidateSSHConfigOption validates one deployment SSH option before it is
784// written to users' local SSH configs.

Callers 2

ValidateMethod · 0.85

Calls 1

ValidateSSHConfigOptionFunction · 0.85

Tested by 1