Documentation
¶
Index ¶
- Constants
- Variables
- func Catch(name string)
- func Close()
- func Debug(format string, v ...interface{})
- func Error(format string, v ...interface{})
- func Fatal(format string, v ...interface{})
- func FunName(i interface{}) string
- func GenEthAddr(n int) []byte
- func GenToken(n int) string
- func H2D8(h string) uint8
- func H2D16(h string) uint16
- func IP4Network2Range(addr, mask net.IP) (net.IP, net.IP)
- func IP4Network2RangeN(addr, mask net.IP, n uint32) (net.IP, net.IP)
- func Info(format string, v ...interface{})
- func Init(file string, level int)
- func Netmask2Len(s string) int
- func ParseIP4Netmask(addr, prefix string) (net.IP, net.IP)
- func PrettyBytes(b uint64) string
- func PrettyDrive(ctl, bus, tgt, unit uint16) string
- func PrettyKBytes(k uint64) string
- func PrettyPCI(dom, bus, slot, fun uint16) string
- func PrettySecs(t uint64) string
- func Print(format string, v ...interface{})
- func SetLog(level int)
- func ToBytes(v, u string) uint64
- func Warn(format string, v ...interface{})
- type Dir
- type Err
- type Logger
- func (l *Logger) Debug(format string, v ...interface{})
- func (l *Logger) Error(format string, v ...interface{})
- func (l *Logger) Fatal(format string, v ...interface{})
- func (l *Logger) Info(format string, v ...interface{})
- func (l *Logger) Print(format string, v ...interface{})
- func (l *Logger) SaveError(format string, v ...interface{})
- func (l *Logger) Warn(format string, v ...interface{})
Constants ¶
View Source
const ( PRINT = 0x00 DEUBG = 0x01 INFO = 0x02 WARN = 0x03 ERROR = 0x04 FATAL = 0xff )
Variables ¶
View Source
var ( Version string Date string Commit string )
View Source
var DIR = Dir{}
View Source
var JSON = jsonUtils{}
View Source
var Log = Logger{ Level: INFO, FileName: ".log.error", // contains filtered or unexported fields }
View Source
var XML = xmlUtils{}
Functions ¶
func GenEthAddr ¶
func IP4Network2RangeN ¶ added in v0.4.83
func Netmask2Len ¶
func PrettyBytes ¶
func PrettyDrive ¶ added in v0.2.11
func PrettyKBytes ¶
func PrettySecs ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.