Documentation ¶
Index ¶
Constants ¶
const COPY_HEADER_TEMPLATE = "AUTO-GENERATED, DO NOT EDIT!\nPlease edit the original at %s"
template for the header
const LICENSE_TEMPLATE = "Copyright © %d Ory Corp Inc."
LICENSE defines the full license text.
const LICENSE_TOKEN = "Copyright ©"
LICENSE_TOKEN defines the token that identifies comments containing the license.
const ROOT_PATH = "https://github.com/ory/meta/blob/master/"
the root path for links to the original NOTE: might have to convert to a CLI switch
Variables ¶
var Main = &cobra.Command{
Use: "headers",
Short: "Adds language-specific headers to files",
}
Functions ¶
func AddLicenses ¶
addLicenses adds or updates the Ory license header in all files within the given directory.
func CopyFile ¶
Header-aware equivalent of the Unix `cp` command. Copies the given source file (path must be relative to CWD) to the given absolute path and prepends the COPY_HEADER_TEMPLATE to the content.
func CopyFileNoOverwrite ¶
Header-aware equivalent of the Unix `cp -n` command. Copies the given source file (path must be relative to CWD) to the given absolute path if the destination file does not exist and prepends the COPY_HEADER_TEMPLATE to the content.
Types ¶
This section is empty.