This commit is contained in:
Michael Höß 2022-02-21 20:57:38 +01:00
parent f27366251c
commit 2a0cef3bda
2 changed files with 8 additions and 5 deletions

View File

@ -1,3 +1,5 @@
/* Copyright (C) 2022, M. Höß, hoess@gmx.net. MIT Licensed */
package main
import (
@ -175,14 +177,15 @@ func setup() (*types.Job, error) {
}
func main() {
fmt.Println("Jobwatch 0.1")
job, err := setup()
if job == nil && err == nil {
fmt.Println("<<<jobwatch>>>")
fmt.Println("<<<jobwatch:sep(0)>>>")
state.ShowAll()
fmt.Println("<<<>>>")
} else {
fmt.Fprintln(os.Stderr, "Jobwatch 0.1 (C) 2022 hoess@gmx.net")
var res state.State
if err == nil {
res, err = runJob(*job)

View File

@ -36,7 +36,7 @@ type summaryEntry struct {
}
type summaryPerUser struct {
UserId string `json:"userd_id"`
UserId string `json:"user_id"`
Path string `json:"-"`
Entries []summaryEntry `json:"entries"`
}
@ -208,7 +208,7 @@ func ShowAll() error {
return err
}
fmt.Printf("%v", string(bytes))
fmt.Printf("%v\n\n", string(bytes))
}
return nil