MCPcopy Index your code
hub / github.com/perkeep/perkeep / AsStaticSocket

Method AsStaticSocket

pkg/schema/blob.go:347–353  ·  view source on GitHub ↗

AsStaticSocket returns the StaticFile as a StaticSocket if the StaticFile represents a socket. Otherwise, it returns the zero value of StaticSocket and false.

()

Source from the content-addressed store, hash-verified

345// StaticFile represents a socket. Otherwise, it returns the zero
346// value of StaticSocket and false.
347func (sf StaticFile) AsStaticSocket() (ss StaticSocket, ok bool) {
348 if sf.b.ss.Type == TypeSocket {
349 return StaticSocket{sf}, true
350 }
351
352 return
353}
354
355// A Builder builds a JSON blob.
356// After mutating the Builder, call Blob to get the built blob.

Callers 2

TestStaticSocketFunction · 0.80
smartFetchFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestStaticSocketFunction · 0.64