helper

package
v0.0.0-...-42b7ae8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const PIDFolder = "tmp/pids"

PIDFolder is path to pid folder

View Source
const PIDName = "alarmii.pid"

PIDName is pid file name

Variables

This section is empty.

Functions

func EditFileWithDefaultEditor

func EditFileWithDefaultEditor(filePath string) (content []byte, err error)

EditFileWithDefaultEditor opens file with default editor If EDITOR env is not set, it uses vi Returns content of the file and error

func Itob

func Itob(v int) []byte

Itob returns an 8-byte big endian representation of v.

func ReadPID

func ReadPID() (pid int, err error)

ReadPID returns main process pid

func SavePID

func SavePID()

SavePID saves pid to tmp/pids folder

func SetupLogger

func SetupLogger(filePath string)

Types

type Logger

type Logger struct {
	FilePath string
}

func (Logger) Write

func (l Logger) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL