dati

A Go library/binary to parse & execute data against template langauges.
git clone git://src.gearsix.net/dati
Log | Files | Refs | Atom | README | LICENSE

commit b77414a0f0cb0c8cea116ae6655fc79a7964aa70
parent 073ec138d104935cf4e3258646b2ffad5290e723
Author: gearsix <gearsix@tuta.io>
Date:   Thu, 25 Mar 2021 11:42:00 +0000

added support for -flag=arg argument syntax

Diffstat:
Mcmd/suti.go | 10++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/cmd/suti.go b/cmd/suti.go @@ -20,11 +20,11 @@ package main import ( "bufio" "fmt" + "git.gearsix.net/suti" "io" - "path/filepath" "os" + "path/filepath" "strings" - "git.gearsix.net/suti" ) type options struct { @@ -125,6 +125,12 @@ func parseArgs(args []string, existing options) (o options) { flag = "" } + if strings.Contains(flag, "=") { + split := strings.SplitN(flag, "=", 2) + flag = split[0] + args[a] = split[1] + a-- + } // set valid any flags that don't take arguments here } else if (flag == "r" || flag == "root") && len(o.RootPath) == 0 { o.RootPath = basedir(arg)