/* * This file is part of the keycloak-import-realm distribution * (https://github.com/nmasse-itix/keycloak-import-realm). * Copyright (c) 2021 Nicolas Massé . * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, version 3. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ package cmd import ( "fmt" "github.com/spf13/cobra" "github.com/spf13/viper" ) // showCmd represents the show command var showCmd = &cobra.Command{ Use: "show", Short: "Shows current configuration", Long: `TODO`, Run: func(cmd *cobra.Command, args []string) { settings := viper.AllSettings() for k, v := range settings { fmt.Printf("%s: %v\n", k, v) } }, } func init() { configCmd.AddCommand(showCmd) }