gostd

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 27, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package gostd contains go standard helpers.

Index

Constants

This section is empty.

Variables

View Source
var BadgeGoDoc = `{{define "badge/godoc" -}}
[!` +
	`[GoDoc]` +
	`(https://godoc.org/{{.ProviderURL}}/{{.User}}/{{.Name}}?status.svg)` +
	`]` +
	`(http://godoc.org/{{.ProviderURL}}/{{.User}}/{{.Name}})
{{- end}}`

BadgeGoDoc is a template to show a godoc badge.

View Source
var BadgeGoReport = `{{define "badge/goreport" -}}
[!` +
	`[Go Report Card]` +
	`(https://goreportcard.com/badge/{{.ProviderURL}}/{{.User}}/{{.Name}})` +
	`]` +
	`(https://goreportcard.com/report/{{.ProviderURL}}/{{.User}}/{{.Name}})
{{- end}}`

BadgeGoReport is a template to show a goreport badge.

View Source
var InstructionGoGetInstall = `{{define "go/install" -}}
` + "```sh" + `
go get {{.ProviderURL}}/{{.User}}/{{.Name}}
` + "```" + `
{{- end}}`

InstructionGoGetInstall is a template to show instructions to install the package with go get.

Functions

func GoTest

func GoTest(g *emd.Generator) func(string, string, ...string) (string, error)

GoTest Reads the first of the files, or `main.go`, lookup for its package comment and returns it as plain text.

func PkgDoc

func PkgDoc(files ...string) (string, error)

PkgDoc Reads the first of the files, or `main.go`, lookup for its package comment and returns it as plain text.

func Register

func Register(g *emd.Generator) error

Register go standard helpers to the generator.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL