Add structs for stats and output

This commit is contained in:
Torjus Håkestad 2024-07-08 02:49:29 +02:00
parent 9c21a0f10b
commit 57374a598a

16
main.go
View File

@ -62,6 +62,22 @@ type FlakeMetadata struct {
} `json:"locks"`
}
type InputStats struct {
RepoName string `json:"repoName"`
RepoURL string `json:"repoURL"`
OldCommit string `json:"oldCommit"`
LatestCommit string `json:"latestCommit"`
Count int `json:"count"`
}
type WaybarOutput struct {
Text string `json:"text"`
Alt string `json:"alt"`
Tooltip string `json:"tooltip"`
Class string `json:"class"`
Percentage string `json:"percentage"`
}
func LoadConfig() (*Config, error) {
var c Config
if path := os.Getenv("GFLAKESTAT_PATH"); path != "" {