Ejemplo n.º 1
0
func ConfigShow(c *cli.Context, log logging.Logger, _ string) (int, error) {
	used := config.Konfig

	if !c.Bool("defaults") {
		k, err := cfg.Used()
		if err != nil && err != storage.ErrKeyNotFound {
			return 1, err
		}
		if err == nil {
			used = k
		}
	}

	if c.Bool("json") {
		enc := json.NewEncoder(os.Stdout)
		enc.SetIndent("", "\t")
		enc.Encode(used)

		return 0, nil
	}

	printKonfig(used)

	return 0, nil
}
Ejemplo n.º 2
0
// RemoveKiteKey removes the kite key and kitekeydirectory
func (u *Uninstall) RemoveKiteKey() error {
	konfig, err := configcli.Used()
	if err != nil {
		return err
	}
	konfig.KiteKey = ""
	return configcli.Use(konfig)
}