package main import ( "os" "fmt" //"code.gitea.io/sdk/gitea" "github.com/akamensky/argparse" ) func summary() { fmt.Println("Summary") } func main() { parser := argparse.NewParser("gitivity", "Command line tool to get Gitea statistics") Summary := parser.NewCommand("summary", "Generate a summary of a user's activity.") parse_err := parser.Parse(os.Args) if parse_err != nil { fmt.Print(parser.Usage(parse_err)) } config := Configuration{} if err := config.Parse("config.lua"); err != nil { panic("Failed to parse configuration file: "+fmt.Sprint(err)) } fmt.Printf("config.servers: %v\n", config.servers) //client, err := gitea.NewClient(*server_name) //if err != nil { // fmt.Printf("Failed to create Gitea client! (%s)\n", err) // os.Exit(1) //} //server_version, _, err := client.ServerVersion() //if err != nil { // fmt.Printf("Failed to get server version! (%s)\n", err) //} if Summary.Happened() { summary() } }