Documentation
¶
Index ¶
- func DirExists(dirPath string) bool
- func EnsureDir(dir string, mode os.FileMode) error
- func Exit(s string)
- func FileExists(filePath string) bool
- func Kill() error
- func MustReadFile(filePath string) []byte
- func MustWriteFile(filePath string, contents []byte, mode os.FileMode)
- func PrintAllGoroutines()
- func ProtocolAndAddress(listenAddr string) (string, string)
- func ReadFile(filePath string) ([]byte, error)
- func TrapSignal(cb func())
- func WriteFile(filePath string, contents []byte, mode os.FileMode) error
- func WriteFileAtomic(filename string, data []byte, perm os.FileMode) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustReadFile ¶
func PrintAllGoroutines ¶
func PrintAllGoroutines()
func ProtocolAndAddress ¶
ProtocolAndAddress splits an address into the protocol and address components. For instance, "tcp://127.0.0.1:8080" will be split into "tcp" and "127.0.0.1:8080". If the address has no protocol prefix, the default is "tcp".
func TrapSignal ¶
func TrapSignal(cb func())
TrapSignal catches the SIGTERM/SIGINT and executes cb function. After that it exits with code 0.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.