goapp

package module
v0.62.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: Apache-2.0 Imports: 18 Imported by: 3

README

goapp GoDoc License

The package is used to initialize an application to simply the creation. Support Go1.21+.

Install

$ go get -u github.com/xgfone/goapp

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version is the version of app.
	//
	// Default: github.com/xgfone/gover.Text()
	Version string

	// AppName is the name of app.
	//
	// Default: filepath.Base(os.Args[0]), but not contain the suffix ".exe"
	AppName string

	// PWD is the current working directory.
	PWD string
)

Functions

func Init added in v0.7.0

func Init(opts ...gconf.Opt)

Init is used to initialize the application.

  1. Register the log options.
  2. Initialize configuration.
  3. Initialize the logging.
  4. Call the registered initialization functions.
  5. Start a goroutine to monitor the exit signals.

Types

This section is empty.

Directories

Path Synopsis
Package config is used to configure the application.
Package config is used to configure the application.
Package db provides some assistant functions about the database.
Package db provides some assistant functions about the database.
log
Package log is used to initialize the logging.
Package log is used to initialize the logging.
file
Package provides a rotating file based on the file size.
Package provides a rotating file based on the file size.

Jump to

Keyboard shortcuts

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