-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option for no diff blocks (#106)
* Use goembed for tempaltes * Add option to skip marking of diff blocks Fixes #105 * Test only go 1.16
- Loading branch information
Showing
15 changed files
with
241 additions
and
197 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ require ( | |
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d | ||
) | ||
|
||
go 1.13 | ||
go 1.16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{{ define "examples" }} | ||
{{ if . }} | ||
|
||
## Examples | ||
|
||
{{ template "examplesNoHeading" . }} | ||
|
||
{{ end }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{{ define "examplesNoHeading" }} | ||
{{ if . }} | ||
|
||
{{ range . }} | ||
|
||
{{ if .Name }}### {{.Name}}{{ end }} | ||
|
||
{{ doc .Doc }} | ||
|
||
{{ if .Play }}{{gocode .Play}}{{ else }}{{gocode .Code.Text}}{{ end }} | ||
{{ if .Output }} Output: | ||
|
||
{{ code .Output }}{{ end }} | ||
{{ end }} | ||
|
||
{{ end }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{ define "functions" }} | ||
{{ if .Funcs }} | ||
|
||
## Functions | ||
|
||
{{ range .Funcs }} | ||
|
||
### func [{{ .Name }}]({{ urlOrName (index $.Files .Pos.File) }}#L{{ .Pos.Line }}) | ||
|
||
{{ inlineCode .Decl.Text }} | ||
|
||
{{ doc .Doc }} | ||
|
||
{{ template "examplesNoHeading" .Examples }} | ||
{{ end }} | ||
|
||
{{ end }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# {{.Package.Name}} | ||
|
||
{{if .Config.Badges.TravisCI -}} | ||
[![Build Status](https://travis-ci.org/{{fullName .Package}}.svg?branch=master)](https://travis-ci.org/{{fullName .Package}}) | ||
{{end -}} | ||
{{if .Config.Badges.CodeCov -}} | ||
[![codecov](https://codecov.io/gh/{{fullName .Package}}/branch/master/graph/badge.svg)](https://codecov.io/gh/{{fullName .Package}}) | ||
{{end -}} | ||
{{if .Config.Badges.GolangCI -}} | ||
[![golangci](https://golangci.com/badges/{{importPath .Package}}.svg)](https://golangci.com/r/{{importPath .Package}}) | ||
{{end -}} | ||
{{if .Config.Badges.GoDoc -}} | ||
[![GoDoc](https://img.shields.io/badge/pkg.go.dev-doc-blue)](http://pkg.go.dev/{{importPath .Package}}) | ||
{{end -}} | ||
{{if .Config.Badges.GoReportCard -}} | ||
[![Go Report Card](https://goreportcard.com/badge/{{importPath .Package}})](https://goreportcard.com/report/{{importPath .Package}}) | ||
{{ end }} | ||
|
||
{{ doc .Package.Doc }} | ||
|
||
{{ if .Config.Functions }} | ||
{{ template "functions" .Package }} | ||
{{ end }} | ||
|
||
{{ if .Config.Types }} | ||
{{ template "types" .Package }} | ||
{{ end }} | ||
|
||
{{ if (not .Config.SkipSubPackages) }} | ||
{{ template "subpackages" . }} | ||
{{ end }} | ||
|
||
{{ if (not .Config.SkipExamples) }} | ||
{{ template "examples" .Package.Examples }} | ||
{{ end }} | ||
{{ if .Config.Credit }} | ||
--- | ||
Readme created from Go doc with [goreadme](https://github.com/posener/goreadme) | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{{ define "subpackages" }} | ||
{{ if .SubPackages }} | ||
|
||
## Sub Packages | ||
|
||
{{ range .SubPackages }} | ||
* [{{.Path}}](./{{.Path}}){{if .Package.Synopsis}}: {{.Package.Synopsis}}{{end}} | ||
{{ end }} | ||
|
||
{{ end }} | ||
{{ end }} |
Oops, something went wrong.