userByName reloads cache if user not found, more things in test

This commit is contained in:
Harvey Tindall
2020-09-16 19:19:04 +01:00
parent 802f957d22
commit 7d84fdec96
4 changed files with 30 additions and 7 deletions
+7
View File
@@ -132,6 +132,13 @@ func test(app *appContext) {
out, err := json.MarshalIndent(users, "", " ")
fmt.Print(string(out), err)
}
fmt.Printf("Enter a user to grab: ")
var username string
fmt.Scanln(&username)
user, status, err := app.jf.userByName(username, false)
fmt.Printf("userByName (%s): code %d err %s", username, status, err)
out, err := json.MarshalIndent(user, "", " ")
fmt.Print(string(out))
}
func start(asDaemon, firstCall bool) {