From a436aff825de35b00528d145080ad496e6ad3f52 Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Fri, 18 Jun 2021 15:20:38 +0200 Subject: [PATCH] use fmt for format --- envconf.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/envconf.go b/envconf.go index 3f44bde..f50fa54 100644 --- a/envconf.go +++ b/envconf.go @@ -148,7 +148,7 @@ func (c *Config) help() { if v.dtype != TypeNone { if v.hasdef { format := fmt.Sprintf("Variable %%-%ds| Type %%-%ds| Default %%s\n", max[0]+5, max[1]+3) - fmt.Printf(format, strings.Sprintf(`"%s"`, k), v.dtype, strings.Sprintf(`"%s"`, v.defval)) + fmt.Printf(format, fmt.Sprintf(`"%s"`, k), v.dtype, fmt.Sprintf(`"%s"`, v.defval)) } } } @@ -159,7 +159,7 @@ func (c *Config) help() { if v.dtype != TypeNone { if !v.hasdef { format := fmt.Sprintf("Variable %%-%ds| Type %%-%ds| Required\n", max[0]+5, max[1]+3) - fmt.Printf(format, strings.Sprintf(`"%s"`, k), v.dtype) + fmt.Printf(format, fmt.Sprintf(`"%s"`, k), v.dtype) } } }