YetAnotherToDoList/cmd/license.go

57 lines
2.0 KiB
Go
Raw Permalink Normal View History

/*
YetAnotherToDoList
Copyright © 2023 gilex-dev gilex-dev@proton.me
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 <http://www.gnu.org/licenses/>.
*/
package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
// licenseCmd represents the license command
var licenseCmd = &cobra.Command{
Use: "license",
Short: "Show license",
Long: `Show the license and copyright for this program`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("YetAnotherToDoList Copyright (C) 2023 gilex-dev gilex-dev@proton.me\n\n" +
"This program is free software: you can redistribute it and/or modify\n" +
"it under the terms of the GNU General Public License as published by\n" +
"the Free Software Foundation, version 3.\n\n" +
"This program is distributed in the hope that it will be useful,\n" +
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n" +
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" +
"GNU General Public License for more details.\n\n" +
"You should have received a copy of the GNU General Public License\n" +
"along with this program. If not, see <http://www.gnu.org/licenses/>.")
},
}
func init() {
rootCmd.AddCommand(licenseCmd)
// Here you will define your flags and configuration settings.
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// licenseCmd.PersistentFlags().String("foo", "", "A help for foo")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// licenseCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}