MCPcopy Create free account
hub / github.com/containerd/nerdctl / parseExtraHosts

Function parseExtraHosts

pkg/inspecttypes/dockercompat/dockercompat.go:923–930  ·  view source on GitHub ↗
(extraHostsJSON string)

Source from the content-addressed store, hash-verified

921}
922
923func parseExtraHosts(extraHostsJSON string) []string {
924 var extraHosts []string
925 if err := json.Unmarshal([]byte(extraHostsJSON), &extraHosts); err != nil {
926 // Handle error or return empty slice
927 return []string{}
928 }
929 return extraHosts
930}
931
932func getMemorySettingsFromNative(sp *specs.Spec) (*MemorySetting, error) {
933 res := &MemorySetting{}

Callers 1

ContainerFromNativeFunction · 0.85

Calls 1

UnmarshalMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…