Documentation ¶
Overview ¶
Package comments provides functionality to add and remove comments to the top of files.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsFileType ¶
indicates whether the given list of FileTypes contains the given FileType
func FileContentWithoutHeader ¶
FileContentWithoutHeader provides the content of the file with the given path, without the comment block identified by the given token.
func SupportsFile ¶
indicates whether it is possible to add comments to the file with the given name
func WriteFileWithHeader ¶
WriteFileWithHeader creates a file at the given path containing the given file content (header + body). The header argument should contain only text. This method will transform it into the correct comment format.
Types ¶
type FileType ¶
type FileType string
a file format that we know about, represented as its file extension
func GetFileType ¶
provides the extension of the given filepath