Niko, good question. You have your answer already but i’ll add installation advice in the readme or an install guide. Should be trivial anywhere Go is, “go get path && go install gg”
On Thu, Jul 4, 2019 at 10:23 AM 'Niko Schwarz' via golang-nuts < golang-nuts@googlegroups.com> wrote: > What's your recommended strategy for installing it on linux? I guess it'll > take a few years before distributions have easy-to-install packages just > listed in their indices. > > On Thursday, July 4, 2019 at 6:11:47 PM UTC+2, Michael Jones wrote: >> >> Recently I shared my Survey <https://github.com/MichaelTJones/survey> >> program, saying that it was a sidestep from what I was working on but >> interesting and hopefully useful to others. Here is the real thing, named >> gg, that Survey was a test for. GG combines lexical analysis and Go-native >> pattern matching to extend grep(1) for Go developers >> >> GG is smart; the search is restricted, seeking matches only in chosen >> token classes. A search in number literals can match values in addition to >> patterns: "v 255" matches the numeric value 255 in source code as >> 0b1111_1111, 0377, 0o377, 255, 0xff, etc. Go's linear-time regular >> expression engine is Unicode-aware and supports many extensions: numbers in >> identifiers are found with "gg i [0-9]" or "gg i [\d]", find comments with >> math symbols using "gg c \p{Sm}", and Greek in strings via "gg s \p{Greek}". >> >> GG is fast, uses all cores, understands filesystem hierarchies, archives, >> and compression schemes, and is general like grep while focused in a new >> way: find within package names, identifiers, types, strings, comments, and >> more. >> >> Source code: >> https://github.com/MichaelTJones/gg >> >> Man page (all is explained here): >> https://github.com/MichaelTJones/gg/blob/master/gg.pdf >> >> Examples: >> >> Search the Go 1.13 source code for strings containing Megalosaurus, but >> not comments: >> >> $ gg -r s Megalosaurus ~/go >> /Users/mtj/go/src/cmd/link/link_test.go:`text:"London. Michaelmas term >> lately over, and the Lord Chancellor sitting in Lincoln’s Inn Hall. >> Implacable November weather. As much mud in the streets as if the waters >> had but newly retired from the face of the earth, and it would not be >> wonderful to meet a Megalosaurus, forty feet long or so, waddling like an >> elephantine lizard up Holborn Hill. ... >> >> >> Search the Go 1.13 source code for identifiers with greek letters (but >> not strings or comments): >> >> $ gg -r i '\p{Greek}' ~/go >> /Users/mtj/go/src/encoding/json/encode_test.go: A0, À, Aβ int >> /Users/mtj/go/src/math/cmplx/polar.go:func Polar(x complex128) (r, θ >> float64) { >> /Users/mtj/go/src/math/cmplx/rect.go:func Rect(r, θ float64) complex128 { >> /Users/mtj/go/src/math/cmplx/rect.go: s, c := math.Sincos(θ) >> /Users/mtj/go/src/math/rand/rand_test.go: var χ2 float64 >> : >> >> >> Best to all, >> Michael >> >> -- >> >> *Michael T. jonesmichae...@gmail.com* >> > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/golang-nuts/078487a3-cbda-4479-b414-da5aed21f86f%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/078487a3-cbda-4479-b414-da5aed21f86f%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- *Michael T. jonesmichael.jo...@gmail.com <michael.jo...@gmail.com>* -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CALoEmQzK9Qjk68F4Vh7KKaNQ5ttaW0bDM93BFc8H4c8_ZOwEdw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.