mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
20 lines
246 B
Go
20 lines
246 B
Go
package command
|
|
|
|
import (
|
|
"fmt"
|
|
"os"
|
|
)
|
|
|
|
const (
|
|
SUCCESS = iota
|
|
MalformedEtcdctlArguments
|
|
FailedToConnectToHost
|
|
FailedToAuth
|
|
ErrorFromEtcd
|
|
)
|
|
|
|
func handleError(code int, err error) {
|
|
fmt.Fprintln(os.Stderr, "Error: ", err)
|
|
os.Exit(code)
|
|
}
|