pkg

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppExit chan bool = make(chan bool)

Functions

func AbsolutePath

func AbsolutePath(relPath string) string

func CreateDir

func CreateDir(dir string) error

func DirExists

func DirExists(path string) bool

func ExeDir

func ExeDir() (string, error)

func ExePath

func ExePath() (string, error)

func ExecPath

func ExecPath(relPath string) (string, error)

func FileExists

func FileExists(path string) bool

func GetPidByPort

func GetPidByPort(port int) (int, error)

func HasFileDir

func HasFileDir(dir string, flg ...bool) bool

func KillProcess

func KillProcess(pid int) bool

func Log

func Log(str string)

func PortIsUse

func PortIsUse(port int) bool

func SetServiceConfig

func SetServiceConfig(_name, _display, _desc string, action func(chan bool))

func UrlPath

func UrlPath(baseUrl string, relPath ...string) string

Types

type CmdType

type CmdType string
const (
	ServiceInstall   CmdType = "install"
	ServiceUninstall CmdType = "uninstall"
	ServiceStart     CmdType = "start"
	ServiceStop      CmdType = "stop"
	UNKNOW           CmdType = ""
)

type Config

type Config struct {
	ServiceName        string
	ServiceDisplay     string
	ServiceDescription string
	Actions            func(chan bool)
}
var ServiceConfig *Config

Source Files

  • cmdType.go
  • log.go
  • util.go

Jump to

Keyboard shortcuts

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