2023-11-04 13:58:48 -06:00
|
|
|
package cli
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
2023-11-05 10:44:16 -07:00
|
|
|
var config *Config
|
|
|
|
var store *Store
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
var err error
|
|
|
|
|
|
|
|
config, err = NewConfig()
|
|
|
|
if err != nil {
|
|
|
|
Fatal("%v\n", err)
|
|
|
|
}
|
|
|
|
|
|
|
|
store, err = NewStore()
|
|
|
|
if err != nil {
|
|
|
|
Fatal("%v\n", err)
|
|
|
|
}
|
|
|
|
}
|
2023-11-04 13:58:48 -06:00
|
|
|
|
|
|
|
func Fatal(format string, args ...any) {
|
|
|
|
fmt.Fprintf(os.Stderr, format, args...)
|
|
|
|
os.Exit(1)
|
|
|
|
}
|
2023-11-05 01:41:43 -06:00
|
|
|
|
|
|
|
func Warn(format string, args ...any) {
|
|
|
|
fmt.Fprintf(os.Stderr, format, args...)
|
|
|
|
}
|