mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
+gomarkdoc
This commit is contained in:
parent
1f791c84ed
commit
822b8b6e19
19
projects/github.com/princjef/gomarkdoc/example.go
Normal file
19
projects/github.com/princjef/gomarkdoc/example.go
Normal file
|
@ -0,0 +1,19 @@
|
|||
// Package example will show you the power of gomarkdoc.
|
||||
package example
|
||||
|
||||
// Example is just magical.
|
||||
type Example struct {
|
||||
// Foo is an int.
|
||||
Foo int
|
||||
|
||||
// Bar is a string.
|
||||
Bar string
|
||||
}
|
||||
|
||||
// New creates an instance of Example with sensible default values.
|
||||
func New() *Example {
|
||||
return &Example{
|
||||
Foo: 42,
|
||||
Bar: "Baz",
|
||||
}
|
||||
}
|
34
projects/github.com/princjef/gomarkdoc/package.yml
Normal file
34
projects/github.com/princjef/gomarkdoc/package.yml
Normal file
|
@ -0,0 +1,34 @@
|
|||
distributable:
|
||||
url: https://github.com/princjef/gomarkdoc/archive/refs/tags/v{{version}}.tar.gz
|
||||
strip-components: 1
|
||||
|
||||
display-name: gomarkdoc
|
||||
|
||||
versions:
|
||||
github: princjef/gomarkdoc
|
||||
strip: /^v/
|
||||
|
||||
build:
|
||||
dependencies:
|
||||
go.dev: ^1.18
|
||||
env:
|
||||
CGO_ENABLED: 0
|
||||
LDFLAGS:
|
||||
- -extldflags=-static
|
||||
- -w
|
||||
- -s
|
||||
- -X=main.version=v{{version}}
|
||||
script:
|
||||
- go mod download
|
||||
- go build -ldflags="$LDFLAGS" -o gomarkdoc ./cmd/gomarkdoc
|
||||
- mkdir -p "{{ prefix }}"/bin
|
||||
- mv gomarkdoc "{{ prefix }}"/bin
|
||||
|
||||
provides:
|
||||
- bin/gomarkdoc
|
||||
|
||||
test:
|
||||
script:
|
||||
- test "$(gomarkdoc --version)" = "v{{version}}"
|
||||
- gomarkdoc -o example.md
|
||||
- test -f example.md
|
Loading…
Reference in a new issue