Skip to content

Commit d8c7902

Browse files
committed
Minor code cleanup
1 parent aae9a37 commit d8c7902

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

handler/handler.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -1005,17 +1005,17 @@ func (h *Handler) Version(ctx context.Context) error {
10051005
}
10061006

10071007
// Print formats according to a format specifier and writes to handler's standard output.
1008-
func (h *Handler) Print(format string, a ...interface{}) {
1008+
func (h *Handler) Print(s string, v ...interface{}) {
10091009
if env.Get("QUIET") == "on" {
10101010
return
10111011
}
1012-
fmt.Fprintln(h.l.Stdout(), fmt.Sprintf(format, a...))
1012+
fmt.Fprintln(h.l.Stdout(), fmt.Sprintf(s, v...))
10131013
}
10141014

10151015
// doExecWatch repeatedly executes a query against the database.
10161016
func (h *Handler) doExecWatch(ctx context.Context, w io.Writer, opt metacmd.Option, prefix, sqlstr string, qtyp bool, bind []interface{}) error {
10171017
for {
1018-
// this is the actual output that psql has: "Mon Jan 2006 3:04:05 PM MST"
1018+
// the actual output that psql has: "Mon Jan 2006 3:04:05 PM MST" -- which is _slightly_ different than RFC1123
10191019
// fmt.Fprintf(w, "%s (every %fs)\n\n", time.Now().Format("Mon Jan 2006 3:04:05 PM MST"), float64(opt.Watch)/float64(time.Second))
10201020
fmt.Fprintf(w, "%s (every %v)\n", time.Now().Format(time.RFC1123), opt.Watch)
10211021
fmt.Fprintln(w)

0 commit comments

Comments
 (0)