openidec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 7a0bdf67fd85d11ee0067c9a812ccc16b7f4b158
parent 082d5f1d3f5e752acce6508cc9fe3a58fa099452
Author: Petr Razumov <razumov.petr@wb.ru>
Date:   Tue,  4 Apr 2023 15:13:27 +0300

fix: incorrect use of printf-line functions

Diffstat:
Mcmd/idecctl/main.go | 8++++----
Mcmd/idecd/main.go | 4++--
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/cmd/idecctl/main.go b/cmd/idecctl/main.go @@ -241,19 +241,19 @@ Options: } hash[id] += 1 if hash[id] > 0 { - fmt.Printf("Error. DB has changed. Aborted.\n") + fmt.Println("Error. DB has changed. Aborted.") os.Exit(1) } return true }) f.Close() if err != nil { - fmt.Printf("Error: %s\n") + fmt.Println("Error:", err) os.Exit(1) } for _, v := range hash { if v != 0 { - fmt.Printf("Error. DB shrinked. Aborted.\n") + fmt.Println("Error. DB shrinked. Aborted.") os.Exit(1) } } @@ -261,7 +261,7 @@ Options: case "fetch": var echolist []string if len(args) < 2 { - fmt.Printf("No url supplied\n") + fmt.Println("No url supplied") os.Exit(1) } db := open_db(*db_opt) diff --git a/cmd/idecd/main.go b/cmd/idecd/main.go @@ -206,7 +206,7 @@ func main() { return } ii.Info.Printf("/u/point/%s/%s GET request", pauth, tmsg) - fmt.Fprintf(w, PointMsg(edb, db, udb, pauth, tmsg)) + fmt.Fprintln(w, PointMsg(edb, db, udb, pauth, tmsg)) }) http.HandleFunc("/u/point", func(w http.ResponseWriter, r *http.Request) { var pauth, tmsg string @@ -222,7 +222,7 @@ func main() { return } ii.Info.Printf("/u/point/%s/%s POST request", pauth, tmsg) - fmt.Fprintf(w, PointMsg(edb, db, udb, pauth, tmsg)) + fmt.Fprintln(w, PointMsg(edb, db, udb, pauth, tmsg)) }) http.HandleFunc("/x/c/", func(w http.ResponseWriter, r *http.Request) { enames := strings.Split(r.URL.Path[5:], "/")