Documentation ¶
Overview ¶
Package licenseheader handles license headers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Modify ¶
func Modify( licenseType LicenseType, copyrightHolder string, yearRange string, filename string, data []byte, ) ([]byte, error)
Modify modifies the license header for the filename and data.
Returns the modified data, or the unmodified data if no modifications. If the filename extension is not handled, returns the unmodified data.
Note this only works with UTF-8 data with lines split by '\n'.
Types ¶
type LicenseType ¶
type LicenseType int
LicenseType is a recognized license type.
const ( // LicenseTypeNone is the no license type. LicenseTypeNone LicenseType = iota + 1 // LicenseTypeApache is the Apache 2.0 license type. LicenseTypeApache // LicenseTypeProprietary is the proprietary license type. LicenseTypeProprietary )
func ParseLicenseType ¶
func ParseLicenseType(s string) (LicenseType, error)
ParseLicenseType parses the LicenseType.
Click to show internal directories.
Click to hide internal directories.