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

Method MarshalText

codersdk/allowlist.go:76–76  ·  view source on GitHub ↗

Implement encoding.TextMarshaler/Unmarshaler for broader compatibility

()

Source from the content-addressed store, hash-verified

74// Implement encoding.TextMarshaler/Unmarshaler for broader compatibility
75
76func (t APIAllowListTarget) MarshalText() ([]byte, error) { return []byte(t.String()), nil }
77
78func (t *APIAllowListTarget) UnmarshalText(b []byte) error {
79 return t.UnmarshalJSON([]byte("\"" + string(b) + "\""))

Callers 5

NodeToProtoFunction · 0.80
coordinationTestFunction · 0.80
UpdateNodeMethod · 0.80
convertDiffTypeFunction · 0.80

Calls 1

StringMethod · 0.95