diff --git a/projects/github.com/princjef/gomarkdoc/example.go b/projects/github.com/princjef/gomarkdoc/example.go new file mode 100644 index 00000000..0955cf3e --- /dev/null +++ b/projects/github.com/princjef/gomarkdoc/example.go @@ -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", + } +} diff --git a/projects/github.com/princjef/gomarkdoc/package.yml b/projects/github.com/princjef/gomarkdoc/package.yml new file mode 100644 index 00000000..7ab769cd --- /dev/null +++ b/projects/github.com/princjef/gomarkdoc/package.yml @@ -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