MCPcopy
hub / github.com/perkeep/perkeep / AsStaticFIFO

Method AsStaticFIFO

pkg/schema/blob.go:336–342  ·  view source on GitHub ↗

AsStaticFIFO returns the StatifFile as a StaticFIFO if the StaticFile represents a fifo. Otherwise, it returns the zero value of StaticFIFO and false.

()

Source from the content-addressed store, hash-verified

334// StaticFile represents a fifo. Otherwise, it returns the zero value
335// of StaticFIFO and false.
336func (sf StaticFile) AsStaticFIFO() (fifo StaticFIFO, ok bool) {
337 if sf.b.ss.Type == TypeFIFO {
338 return StaticFIFO{sf}, true
339 }
340
341 return
342}
343
344// AsStaticSocket returns the StaticFile as a StaticSocket if the
345// StaticFile represents a socket. Otherwise, it returns the zero

Callers 2

TestStaticFIFOFunction · 0.80
smartFetchFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestStaticFIFOFunction · 0.64