flags

package
v0.6.6 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: MIT Imports: 11 Imported by: 6

Documentation

Overview

Import this package to get useful flags every server should have

import (
	_ "ask.systems/daemon/tools/flags
)

Provides:

  • -version which prints the module name, version and the CopyrightNotice, and for development builds prints version control information.
  • -syslog and -syslog_remote which enable directly sending log package logs to the syslogd service directly for collecting all your logs together.

If you'd like to have the -version flag but exclude the syslog flags then you can compile your binary with:

go build -tags nosyslog

Index

Constants

This section is empty.

Variables

View Source
var CopyrightNotice string

Set this to information about your license and copyright to print in the -version flag results

Must be set before calling flag.Parse

View Source
var Syslog *syslog.Writer

Use this if you want to use the log severity methods. This is only initialized if the -syslog or the -syslog_remote flag is set and flag.Parse has been called.

If you need to compile your code on windows you can only assume io.WriteCloser.

Using this writer directly will not also log to stdout

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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