mirror of
https://github.com/Slug-Boi/cocommit.git
synced 2026-05-13 12:45:47 +00:00
Update code for usage message
This commit is contained in:
@@ -50,7 +50,6 @@ func main() {
|
|||||||
authors = envVar
|
authors = envVar
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
file, err := os.Open(authors)
|
file, err := os.Open(authors)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
authors, _ = os.UserConfigDir()
|
authors, _ = os.UserConfigDir()
|
||||||
@@ -237,13 +236,25 @@ func NoInput(args []string, users map[string]user) {
|
|||||||
create_author_file()
|
create_author_file()
|
||||||
}
|
}
|
||||||
// if calling binary with nothing or only string
|
// if calling binary with nothing or only string
|
||||||
print("Usage: cocommit <commit message> <co-author1> [co-author2] [co-author3] || \ncocommit <commit message> <co-author1:email> [co-author2:email] [co-author3:email] || \ncocommit <commit message> all || \ncocommit <commit message> ^<co-author1> ^[co-author2] || \ncocommit <commit message> <group> || \ncocommit users || \nMixes of both")
|
command_options := []string{
|
||||||
|
"cocommit <commit message> <co-author1> [co-author2] [co-author3]",
|
||||||
|
"cocommit <commit message> <co-author1:email> [co-author2:email] [co-author3:email]",
|
||||||
|
"cocommit <commit message> all",
|
||||||
|
"cocommit <commit message> ^<co-author1> ^[co-author2]",
|
||||||
|
"cocommit <commit message> <group>",
|
||||||
|
"cocommit users",
|
||||||
|
}
|
||||||
|
println("Usage:")
|
||||||
|
for _, v := range command_options {
|
||||||
|
print(v)
|
||||||
|
println(" ||")
|
||||||
|
}
|
||||||
|
println("Mixes of both")
|
||||||
|
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func create_author_file(param ...string) {
|
func create_author_file(param ...string) {
|
||||||
var input string
|
var input string
|
||||||
authors, err := os.UserConfigDir()
|
authors, err := os.UserConfigDir()
|
||||||
|
|||||||
Reference in New Issue
Block a user