mjslabs / ggft Goto Github PK
View Code? Open in Web Editor NEWGo Generate from Template
License: Mozilla Public License 2.0
Go Generate from Template
License: Mozilla Public License 2.0
$ go get https://github.com/mjslabs/ggft
go get https:/github.com/mjslabs/ggft: malformed module path "https:/github.com/mjslabs/ggft": invalid char ':'
think it should be
go get github.com/mjslabs/ggft
instead of the https url
The location of the config directory and file is hard coded. This should be configurable by a command line flag or environment variable.
Tried to use it and it flamed, not really sure why. I didn't intentionally have any go templated things I expected to replace, but there are many different types of vars in the repo so maybe that is a problem?
steps to reproduce
ggft get https://github.com/raboley/review-infrastructure ri
ggft new ri aks
error message.
# output
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0x14d2a0b]
goroutine 1 [running]:
text/template.errRecover(0xc00014f650)
/usr/local/opt/go/libexec/src/text/template/exec.go:163 +0x1c2
panic(0x1657ba0, 0x1c352c0)
/usr/local/opt/go/libexec/src/runtime/panic.go:969 +0x166
text/template.(*Template).execute(0x0, 0x17f0800, 0xc00017fa70, 0x1653440, 0xc00017ea50, 0x0, 0x0)
/usr/local/opt/go/libexec/src/text/template/exec.go:217 +0x19b
text/template.(*Template).Execute(...)
/usr/local/opt/go/libexec/src/text/template/exec.go:203
github.com/mjslabs/ggft/pkg/tmpl.ScanTemplateForVars(0xc000028d20, 0x4c, 0xe, 0x2f, 0xffffffffffffffff, 0x0, 0x2f00002e001b3520)
/Users/russellboley/.go/pkg/mod/github.com/mjslabs/[email protected]/pkg/tmpl/tmpl.go:48 +0x13b
github.com/mjslabs/ggft/cmd.getVarsFromUser(0xc000028d20, 0x4c, 0x5, 0x0)
/Users/russellboley/.go/pkg/mod/github.com/mjslabs/[email protected]/cmd/new.go:109 +0x3f
github.com/mjslabs/ggft/cmd.processPath(0xc000028d20, 0x4c, 0xc00002c900, 0x26, 0x7ffeefbff894, 0x3, 0x107d640, 0xc000028d70)
/Users/russellboley/.go/pkg/mod/github.com/mjslabs/[email protected]/cmd/new.go:98 +0x1de
github.com/mjslabs/ggft/cmd.walkTemplateDirectory.func1(0xc000028d20, 0x4c, 0x1802140, 0xc0001b3450, 0x0, 0x0, 0x13, 0xc00014f8d0)
/Users/russellboley/.go/pkg/mod/github.com/mjslabs/[email protected]/cmd/new.go:73 +0x59
path/filepath.walk(0xc000028d20, 0x4c, 0x1802140, 0xc0001b3450, 0xc00014fc30, 0x0, 0x0)
/usr/local/opt/go/libexec/src/path/filepath/path.go:360 +0x425
path/filepath.walk(0xc0000252c0, 0x38, 0x1802140, 0xc0001b32b0, 0xc00014fc30, 0x0, 0x0)
/usr/local/opt/go/libexec/src/path/filepath/path.go:384 +0x2ff
path/filepath.walk(0xc00002d050, 0x2e, 0x1802140, 0xc0001a9520, 0xc00014fc30, 0x0, 0x0)
/usr/local/opt/go/libexec/src/path/filepath/path.go:384 +0x2ff
path/filepath.walk(0xc00002c900, 0x26, 0x1802140, 0xc00013d5f0, 0xc00014fc30, 0x0, 0xc00002cc00)
/usr/local/opt/go/libexec/src/path/filepath/path.go:384 +0x2ff
path/filepath.Walk(0xc00002c900, 0x26, 0xc00014fc30, 0x80000c00002cc00, 0x28)
/usr/local/opt/go/libexec/src/path/filepath/path.go:406 +0xff
github.com/mjslabs/ggft/cmd.walkTemplateDirectory(0xc00002c900, 0x26, 0x7ffeefbff894, 0x3, 0xc00019a098, 0xc00017ec60)
/Users/russellboley/.go/pkg/mod/github.com/mjslabs/[email protected]/cmd/new.go:72 +0x83
github.com/mjslabs/ggft/cmd.newProject(0xc00002c900, 0x26, 0x7ffeefbff894, 0x3, 0x26, 0x0)
/Users/russellboley/.go/pkg/mod/github.com/mjslabs/[email protected]/cmd/new.go:68 +0x1c4
github.com/mjslabs/ggft/cmd.cmdNew(0x1c3e1a0, 0xc00000fe00, 0x2, 0x2)
/Users/russellboley/.go/pkg/mod/github.com/mjslabs/[email protected]/cmd/new.go:44 +0xeb
github.com/spf13/cobra.(*Command).execute(0x1c3e1a0, 0xc00000fdc0, 0x2, 0x2, 0x1c3e1a0, 0xc00000fdc0)
/Users/russellboley/.go/pkg/mod/github.com/spf13/[email protected]/command.go:846 +0x29d
github.com/spf13/cobra.(*Command).ExecuteC(0x1c3e440, 0x104380a, 0x1c01a00, 0xc000000180)
/Users/russellboley/.go/pkg/mod/github.com/spf13/[email protected]/command.go:950 +0x349
github.com/spf13/cobra.(*Command).Execute(...)
/Users/russellboley/.go/pkg/mod/github.com/spf13/[email protected]/command.go:887
github.com/mjslabs/ggft/cmd.Execute()
/Users/russellboley/.go/pkg/mod/github.com/mjslabs/[email protected]/cmd/root.go:40 +0x31
main.main()
/Users/russellboley/.go/pkg/mod/github.com/mjslabs/[email protected]/main.go:6 +0x20
If configuration reading errors, a config initialization is attempted followed by another attempt at reading the config. This should be made smarter so that errors are handled properly.
when trying to follow the install instructions using the makefile I ran into a no target found.
I assumed the error was me using the default make that comes with macs, but after inspecting the Makefile I couldn't find a target called install either.
➜ ~ git clone https://github.com/mjslabs/ggft.git && cd ggft
make install
Cloning into 'ggft'...
remote: Enumerating objects: 75, done.
remote: Counting objects: 100% (75/75), done.
remote: Compressing objects: 100% (60/60), done.
remote: Total 75 (delta 20), reused 66 (delta 13), pack-reused 0
Unpacking objects: 100% (75/75), 40.15 KiB | 587.00 KiB/s, done.
make: *** No rule to make target `install'. Stop.
➜ ggft git:(master) make install
When downloading a template using get
, it would be helpful to be able to specify the git ref (branch, tag, etc.) and not default to the remote default branch.
Currently no examples or documentation exists for how to create a template repo to be used by ggft. Add to the README and create a sample repo.
Currently ggft will skip ".tmpl" files, assuming they are a template that is part of the template repo code base, and not for ggft to parse (e.g. helm templates). Enable the functionality to configure that suffix or additional suffixes so certain files will be skipped by ggft's template parsing code (and trim the suffix on copy).
Example:
ggft new ms service -s notmpl
would copy files that end in .notmpl, stripping the suffix and not parsing it as a template.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.