package main /* this enables command line options from other packages like 'gui' and 'log' */ import ( log "go.wit.com/log" ) var NOW *log.LogFlag var INFO *log.LogFlag var SPEW *log.LogFlag var WARN *log.LogFlag var ERROR *log.LogFlag func init() { full := "toolkit/nocui" short := "nocui" NOW = log.NewFlag("NOW", true, full, short, "temp debugging stuff") INFO = log.NewFlag("INFO", true, full, short, "normal debugging stuff") WARN = log.NewFlag("WARN", true, full, short, "bad things") SPEW = log.NewFlag("SPEW", false, full, short, "spew stuff") ERROR = log.NewFlag("ERROR", true, full, short, "toolkit errors") } var argv args type args struct { Width float64 `arg:"--width" default:"640" help:"window width"` Height float64 `arg:"--height" default:"480" help:"window height"` Filename string `arg:"--filename" help:"what .glsl file to render"` DryRun bool `arg:"--dry-run" help:"show what would be run"` GLdrift float32 `arg:"--drift" default:"0.01" help:"how fast things move around"` // Fetch bool `arg:"--git-fetch" default:"false" help:"run 'git fetch' on all your repos"` } func (args) Version() string { return "go-clone " + VERSION + " Built on " + BUILDTIME } func (a args) Description() string { return ` git clone go repositories Examples: go-clone go.wit.com/apps/go-clone # simply try to git clone this go-clone --recursive go.wit.com/apps/go-clone # recursively clone all the dependancies go-clone --auto-work go.wit.com/apps/go-clone # if you are using a go.work file, recreate the go.work file go-clone --go-reset # recreate every go.mod and go.sum file go-clone --git-pull # run 'git pull' in every repo go-clone --build # build every binary package go-clone --install # install every binary package ` }