config

package
v0.0.0-...-6f7621a Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const CLIName = "atlas"

CLIName is the name of the project.

Variables

View Source
var ErrContextConfigValueIsNotConfigType = errors.New(
	"context config value cannot be cast to config type",
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Path    string `validate:"required,dir"`
	Version string
}

Config stores configuration required by the CLI.

func NewConfig

func NewConfig(version string) (*Config, error)

NewConfig creates a new Config type.

type ContextKey

type ContextKey string

ContextKey is a dedicated type for accessing context values via a key, to avoid collisions. https://www.calhoun.io/pitfalls-of-context-values-and-how-to-avoid-or-mitigate-them

const ContextConfigKey ContextKey = "atlas.config"

ContextConfigKey is the key used to store the Config in a context.Context.

Jump to

Keyboard shortcuts

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