MCPcopy
hub / github.com/caddyserver/caddy / WeakString

TypeAlias WeakString

modules/caddyhttp/caddyhttp.go:162–162  ·  view source on GitHub ↗

WeakString is a type that unmarshals any JSON value as a string literal, with the following exceptions: 1. actual string values are decoded as strings; and 2. null is decoded as empty string; and provides methods for getting the value as various primitive types. However, using this type removes an

Source from the content-addressed store, hash-verified

160// primitive types. However, using this type removes any
161// type safety as far as deserializing JSON is concerned.
162type WeakString string
163
164// UnmarshalJSON satisfies json.Unmarshaler according to
165// this type's documentation.

Callers 12

UnmarshalCaddyfileMethod · 0.92
UnmarshalCaddyfileMethod · 0.92
UnmarshalCaddyfileMethod · 0.92
parsePHPFastCGIFunction · 0.92
UnmarshalCaddyfileMethod · 0.92
parseRedirFunction · 0.92
UnmarshalCaddyfileMethod · 0.85
buildHTTPServerFunction · 0.85
makeRedirRouteMethod · 0.85
UnmarshalCaddyfileMethod · 0.85
UnmarshalJSONMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected