MCPcopy Create free account
hub / github.com/blues/note / newCondAddrEncoder

Function newCondAddrEncoder

jsonxt/encode.go:829–832  ·  view source on GitHub ↗

newCondAddrEncoder returns an encoder that checks whether its value CanAddr and delegates to canAddrEnc if so, else to elseEnc.

(canAddrEnc, elseEnc encoderFunc)

Source from the content-addressed store, hash-verified

827// newCondAddrEncoder returns an encoder that checks whether its value
828// CanAddr and delegates to canAddrEnc if so, else to elseEnc.
829func newCondAddrEncoder(canAddrEnc, elseEnc encoderFunc) encoderFunc {
830 enc := condAddrEncoder{canAddrEnc: canAddrEnc, elseEnc: elseEnc}
831 return enc.encode
832}
833
834func isValidTag(s string) bool {
835 if s == "" {

Callers 1

newTypeEncoderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected