gowhoson

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ClientConfig is a config file name for client.
	ClientConfig = "client.json"
	// ServerConfig is a config file name for server.
	ServerConfig = "gowhoson.json"
	// ServerCtlConfig is a config file name for server control.
	ServerCtlConfig = "serverctl.json"
)

Variables

This section is empty.

Functions

func GetClientConfig

func GetClientConfig(c *cli.Context) (string, *whoson.ClientConfig, error)

GetClientConfig return client config file and new ClientConfig struct pointer and error.

func GetClientConfigDir

func GetClientConfigDir() string

GetClientConfigDir return config file directory.

func GetServerConfig

func GetServerConfig(c *cli.Context) (string, *whoson.ServerConfig, error)

GetServerConfig return server config file and new ServerConfig struct pointer and error.

func GetServerCtlConfig

func GetServerCtlConfig(c *cli.Context) (string, *whoson.ServerCtlConfig, error)

GetServerCtlConfig return server config file and new ServerCtlConfig struct pointer and error.

func GetServerCtlConfigDir

func GetServerCtlConfigDir() string

GetServerCtlConfigDir return config file directory.

func Run

func Run() int

Run cmd/gowhoson package entry point.

Types

type FileEdit

type FileEdit struct {
	Editor string
	Reader io.Reader
	Writer io.Writer
	// contains filtered or unexported fields
}

FileEdit hold information for editablefile.

func NewFileEdit

func NewFileEdit(file string) *FileEdit

NewFileEdit return new FileEdit struct pointer.

func (*FileEdit) Edit

func (f *FileEdit) Edit() error

Edit start edit command.

func (*FileEdit) SetFile

func (f *FileEdit) SetFile(file string)

SetFile set file path to variable.

type Versions

type Versions struct {
	Version   string
	Gitcommit string
}

Versions hold information for program and git and go versions.

var (
	// AppVersions is a application version.
	AppVersions *Versions
)

func NewVersions

func NewVersions(v, git string) *Versions

NewVersions return new Versions struct pointer.

Jump to

Keyboard shortcuts

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