diff --git a/cmd/root.go b/cmd/root.go index 1f05251..2488fe0 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -35,8 +35,9 @@ import ( var cfgFile string var rootCmd = &cobra.Command{ - Use: "mj FILE", - Short: "Rank Majority Judgment polls", + Use: "mj FILE", + Version: "0.2.0", + Short: "Rank Majority Judgment polls", Long: `Resolve majority judgment polls from an input CSV. Say you have the following tally in a CSV file named example.csv: @@ -262,7 +263,7 @@ func init() { // Cobra also supports local flags, which will only run // when this action is called directly. - rootCmd.Flags().BoolP("sort", "s", false, "Sort proposals by Rank") + rootCmd.Flags().BoolP("sort", "s", false, "sort proposals by Rank") } // initConfig reads in config file and ENV variables if set. diff --git a/main.go b/main.go index bc7a939..20a5c1e 100644 --- a/main.go +++ b/main.go @@ -1,18 +1,10 @@ -/* -Copyright © 2021 NAME HERE +/** + * This is a standard Cobra CLI app. + * We don't really use subcommands for now, only the Root one. + * + * A good entrypoint is therefore cmd/root.go + */ -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ package main import "github.com/MieuxVoter/majority-judgment-cli/cmd"