dati

data and template interface
git clone git://git.gearsix.net/dati
Log | Files | Refs | Atom | README | LICENSE

commit e428190321cfca618139c6ec5c10ab935deb1c21
parent 084a5db7ea5d47e5312043cb2084e7c7613e7184
Author: gearsix <gearsix@tuta.io>
Date:   Mon, 15 Mar 2021 14:46:12 +0000

trimmed extra newlines from warn prints

Diffstat:
Msrc/suti.go | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/suti.go b/src/suti.go @@ -19,6 +19,11 @@ type Options struct { var options Options +func warn(msg string, args ...interface{}) { + fmt.Println("WARNING", strings.TrimSuffix(fmt.Sprintf(msg, args...), "\n")) + return +} + func init() { if len(os.Args) <= 1 { print("nothing to do") @@ -69,11 +74,6 @@ func main() { return } -func warn(msg string, args ...interface{}) { - fmt.Println("WARNING", fmt.Sprintf(msg, args...)) - return -} - // custom arg parser because golang.org/pkg/flag doesn't support list args func parseArgs(args []string, existing Options) (o Options) { o = existing