apps

package
v0.0.0-...-cd4d371 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default

func Default(opts ...interface{})

func GetPath

func GetPath(dirType, fn string) string

func Init

func Init(dir string)

func LogOut

func LogOut(name string) io.WriteCloser

func Name

func Name() string

func ParseFlag

func ParseFlag(name, value, desc string)

func ReadBytes

func ReadBytes(dirType, fn string) ([]byte, error)

func ReadConfig

func ReadConfig(name string, opt interface{}) error

func ReadToml

func ReadToml(dirType, name string, v interface{}) error

func ReadYaml

func ReadYaml(dirType, name string, v interface{}) error

func Root

func Root() string

func SinglonCheck

func SinglonCheck() bool

SinglonCheck 确保单例运行

func Valid

func Valid(opts ...interface{}) error

func WaitSignal

func WaitSignal()

WaitInterrupt 等待信号,如果取消了,会直接过

func WriteBytes

func WriteBytes(dirType, fn string, data []byte) error

func WriteToml

func WriteToml(dirType, name string, v interface{}) error

func WriteYaml

func WriteYaml(dirType, name string, v interface{}) error

Types

type DefaultConfig

type DefaultConfig interface {
	Default()
}

type ValidConfig

type ValidConfig interface {
	Valid() error
}

Jump to

Keyboard shortcuts

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