AsStaticSocket returns the StaticFile as a StaticSocket if the StaticFile represents a socket. Otherwise, it returns the zero value of StaticSocket and false.
()
| 345 | // StaticFile represents a socket. Otherwise, it returns the zero |
| 346 | // value of StaticSocket and false. |
| 347 | func (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. |
no outgoing calls