Ryan McGuire
373581c58a
All checks were successful
Build and Publish / release (push) Successful in 1m22s
31 lines
609 B
Go
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
|
|
)
|