Closed dontlaugh closed 2 years ago
Seems to work. Need to check on the lint failures.
coleman@trajan /home/coleman/Code/dstask (embedded)
0 % source <(dstask zsh-completion)
0 % make lint
"qa/lint.sh"
const.go:62:2: don't use ALL_CAPS in Go names; use CamelCase (golint)
CMD_PRINT_ZSH_COMPLETION = "zsh-completion"
^
const.go:63:2: don't use ALL_CAPS in Go names; use CamelCase (golint)
CMD_PRINT_BASH_COMPLETION = "bash-completion"
^
completions/embed.go:3:8: a blank import should be only in a main or test package, or have a comment justifying it (golint)
import _ "embed"
We may need to adjust how these lints work? I've added some //nolint
comments to keep the linter from complaining, but I don't know why, for instance, it's not complaining about other all caps constants in this file. :thinking:
This is ready for review. I've opted to add //nolint
where the complaints from golint
seemed wrong to me. FWIW, we need a new linter anyways #167
@naggie bump
Thanks @dontlaugh -- a useful change. I like the new mechanism to loading strings into the exe provided by go!
Sorry it took so long to merge.
Our completion scripts can be embedded as global strings.
New zsh-completion and bash-completion subcommands print these embedded strings to stdout. Users can source them from their startup scripts:
Add symlinks at original completion script locations to (hopefully) ease transition for packagers. Remove these eventually.
Also, update CI test env to golang:1.16
Closes #162