MCPcopy
hub / github.com/ContainerSSH/ContainerSSH / Defaults

Function Defaults

internal/structutils/defaults.go:10–12  ·  view source on GitHub ↗

Defaults fills a struct pointer with default values from the "default" tag. It only fills public fields. - Scalars can be provided directly - maps, structs, etc. can be provided in JSON format - time.Duration can be provided in text format (e.g. 60s)

(data interface{})

Source from the content-addressed store, hash-verified

8// - maps, structs, etc. can be provided in JSON format
9// - time.Duration can be provided in text format (e.g. 60s)
10func Defaults(data interface{}) {
11 defaults.MustSet(data)
12}
13
14// DefaultsProvider is a struct that has a custom default setter.
15type DefaultsProvider interface {

Callers 15

createClientServerConfigFunction · 0.92
TestKerberosGSSAPIAuthFunction · 0.92
newGitHubProviderFunction · 0.92
getKubernetesConfigFunction · 0.92
NewTestServerFunction · 0.92
TestReadyRejectionFunction · 0.92
TestAuthGSSAPIFunction · 0.92
TestKeepAliveFunction · 0.92
startMethod · 0.92
NewFunction · 0.92

Calls

no outgoing calls

Tested by 15

createClientServerConfigFunction · 0.74
TestKerberosGSSAPIAuthFunction · 0.74
getKubernetesConfigFunction · 0.74
TestReadyRejectionFunction · 0.74
TestAuthGSSAPIFunction · 0.74
TestKeepAliveFunction · 0.74
startMethod · 0.74
TestConformanceFunction · 0.74
TestConformanceFunction · 0.74