goapp

package module
v0.73.0 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2026 License: Apache-2.0 Imports: 19 Imported by: 3

README

goapp

GoDoc License Minimum Go Version Latest SemVer

The package is used to initialize an application to simply the creation.

Install

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppName string

AppName is the name of app.

Default: filepath.Base(os.Args[0]), but not contain the suffix ".exe"

PWD is the current working directory.

View Source
var Version string

Version is the version of app.

Default: github.com/xgfone/gover.Text()

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.

func OnExit added in v0.73.0

func OnExit(f func())

func OnExitPost added in v0.73.0

func OnExitPost(f func())

func OnInit added in v0.73.0

func OnInit(f func())

func OnInitPre added in v0.73.0

func OnInitPre(f func())

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