eia-api-go/cmd/eia-client/internal/util/util.go
Ryan McGuire 373581c58a
All checks were successful
Build and Publish / release (push) Successful in 1m22s
Add docs, improve README
2024-12-17 17:24:48 -05:00

31 lines
609 B
Go

package util
// These constants contain typed values
// for safely setting and retrieving flags
// from the cobra command
const (
FLAG_APIKEY = "apiKey"
ENV_API = "EIA_API_KEY"
FLAG_TMOUT = "timeout"
ENV_TMOUT = "EIA_API_TMOUT"
FLAG_API_LOG_LEVEL = "apiLogLevel"
ENV_API_LOG_LEVEL = "EIA_API_LOG_LEVEL"
FLAG_LOG_LEVEL = "logLevel"
ENV_LOG_LEVEL = "LOG_LEVEL"
FLAG_OUTPUT_DIR = "outdir"
)
// Type for context data
type eiaCtxField uint8
// These constants contain fields to safely set
// or get fields from the command context
const (
CTX_EIA_CLIENT eiaCtxField = iota
CTX_EIA_TMOUT
)