config

package
v0.0.0-...-252d184 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: BSD-3-Clause Imports: 6 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseConfigFile

func ParseConfigFile(path, flagName string, out interface{}) error

ParseConfigFile reads path as JSON5 into out. If non-empty, errors will reference the given flagName.

Types

type Duration

type Duration struct {
	time.Duration
}

Duration is a simple struct wrapper to allow us to parse strings as durations from the incoming config file (e.g,. RunEvery = "5m").

func (*Duration) MarshalText

func (d *Duration) MarshalText() (text []byte, err error)

MarshalText implements the encoding.TextMarshaler interface.

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface.

Jump to

Keyboard shortcuts

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