Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRegex *regexp.Regexp = regexp.MustCompile(`/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+/`)
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action int
Action performed when processing a file
const ( // SkippedAdd means that the file had no license but the new one was not added. // as the -a flag was not provided SkippedAdd Action = iota // SkippedReplace means that the file had a different license but it was not // replaced with the target one as the -r flag was not provided SkippedReplace // LicenseOk means that the license was OK so the file was not changed LicenseOk // LicenseAdded means that the target license was added to the file LicenseAdded // LicenseReplaced means that the file's license was replaced by the target one LicenseReplaced // OperationError means there was an error with one of the files OperationError )
type Options ¶
type Options struct { Add bool Replace bool Path string LicensePath string Extensions []string IgnorePaths []string HeaderRegex *regexp.Regexp }
Options to be followed during processing
Click to show internal directories.
Click to hide internal directories.