doc: Adopters list in README (#252)
Adds a list of most popular projects using avo, based on Github Stars. Auto-generated from the third-party packages list using docgen. Updates #101
This commit is contained in:
committed by
GitHub
parent
956d98e549
commit
57ea8119b7
@@ -14,6 +14,8 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
"text/template"
|
||||
|
||||
"github.com/mmcloughlin/avo/tests/thirdparty"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -25,9 +27,10 @@ func main() {
|
||||
}
|
||||
|
||||
var (
|
||||
typ = flag.String("type", "", "documentation type")
|
||||
tmpl = flag.String("tmpl", "", "explicit template file (overrides -type)")
|
||||
output = flag.String("output", "", "path to output file (default stdout)")
|
||||
typ = flag.String("type", "", "documentation type")
|
||||
tmpl = flag.String("tmpl", "", "explicit template file (overrides -type)")
|
||||
output = flag.String("output", "", "path to output file (default stdout)")
|
||||
pkgsfilename = flag.String("pkgs", "", "packages configuration")
|
||||
)
|
||||
|
||||
func mainerr() (err error) {
|
||||
@@ -51,9 +54,23 @@ func mainerr() (err error) {
|
||||
return err
|
||||
}
|
||||
|
||||
// Load third-party packages.
|
||||
if *pkgsfilename == "" {
|
||||
return errors.New("missing packages configuration")
|
||||
}
|
||||
|
||||
pkgs, err := thirdparty.LoadPackagesFile(*pkgsfilename)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Execute.
|
||||
data := map[string]interface{}{
|
||||
"Packages": pkgs,
|
||||
}
|
||||
|
||||
var buf bytes.Buffer
|
||||
if err := t.Execute(&buf, nil); err != nil {
|
||||
if err := t.Execute(&buf, data); err != nil {
|
||||
return err
|
||||
}
|
||||
body := buf.Bytes()
|
||||
|
||||
@@ -100,6 +100,19 @@ Implementations of full algorithms:
|
||||
* **[geohash](examples/geohash):** Integer [geohash](https://en.wikipedia.org/wiki/Geohash) encoding.
|
||||
* **[stadtx](examples/stadtx):** [`StadtX` hash](https://github.com/demerphq/BeagleHash) port from [dgryski/go-stadtx](https://github.com/dgryski/go-stadtx).
|
||||
|
||||
## Adopters
|
||||
|
||||
Popular projects using `avo`:
|
||||
|
||||
{{ range .Packages.Top 10 -}}
|
||||
{{ if lt .Metadata.Stars 100 }}{{break}}{{ end -}}
|
||||
<img src="https://github.com/{{ .Repository.Owner }}.png?size=24" width="24" height="24" hspace="4" valign="middle" /> [{{ .Repository.Owner }} / **{{ .Repository.Name }}**]({{ .Repository.URL }})
|
||||
{{- if .SubPackage }} / **{{ .SubPackage}}**{{ end }}
|
||||
:star: {{ .Metadata.Stars }}
|
||||
> {{ .Metadata.Description }}
|
||||
|
||||
{{ end -}}
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions to `avo` are welcome:
|
||||
|
||||
Reference in New Issue
Block a user