Documentation
¶
Overview ¶
Package meta defines properties about this project.
Index ¶
- Constants
- Variables
- type Properties
- func (p *Properties) CheckCitable() error
- func (p *Properties) Citation() (string, error)
- func (p *Properties) ConceptDOIURL() string
- func (p *Properties) DOIURL() string
- func (p *Properties) GithubReleaseURL() string
- func (p *Properties) IsRelease() bool
- func (p *Properties) ReleaseTag() string
- func (p *Properties) ReleaseTime() (time.Time, error)
- func (p *Properties) WriteCitation(w io.Writer) error
Constants ¶
const VersionTagPrefix = "v"
VersionTagPrefix is the prefix used on Git tags corresponding to semantic version releases.
Variables ¶
var Meta = &Properties{
BuildVersion: buildversion,
ReleaseVersion: releaseversion,
ReleaseDate: releasedate,
ConceptDOI: conceptdoi,
DOI: doi,
ZenodoID: zenodoid,
}
Meta defines specific properties for the current version of this software.
Functions ¶
This section is empty.
Types ¶
type Properties ¶
type Properties struct { // BuildVersion is the version that was built. Typically populated at build // time and will typically be empty for non-release builds. BuildVersion string // ReleaseVersion is the version of the most recent release. ReleaseVersion string // ReleaseDate is the date of the most recent release. (RFC3339 date format.) ReleaseDate string // ConceptDOI is the DOI for all versions. ConceptDOI string // DOI for the most recent release. DOI string // ZenodoID is the Zenodo deposit ID for the most recent release. ZenodoID string }
Properties about this software package.
func (*Properties) CheckCitable ¶
func (p *Properties) CheckCitable() error
CheckCitable checks whether a citation can be generated for this built version.
func (*Properties) Citation ¶
func (p *Properties) Citation() (string, error)
Citation returns a BibTeX citation for the most recent release.
func (*Properties) ConceptDOIURL ¶
func (p *Properties) ConceptDOIURL() string
ConceptDOIURL returns the DOI URL corresponding to the most recent release.
func (*Properties) DOIURL ¶
func (p *Properties) DOIURL() string
DOIURL returns the DOI URL corresponding to the most recent release.
func (*Properties) GithubReleaseURL ¶
func (p *Properties) GithubReleaseURL() string
GithubReleaseURL returns the URL to the release page on Github.
func (*Properties) IsRelease ¶
func (p *Properties) IsRelease() bool
IsRelease reports whether the built version is a release.
func (*Properties) ReleaseTag ¶
func (p *Properties) ReleaseTag() string
ReleaseTag returns the release tag corresponding to the most recent release.
func (*Properties) ReleaseTime ¶
func (p *Properties) ReleaseTime() (time.Time, error)
ReleaseTime returns the release date as a time object.
func (*Properties) WriteCitation ¶
func (p *Properties) WriteCitation(w io.Writer) error
WriteCitation writes BibTeX citation for the most recent release to the given writer.