func (c Copyright) shebangRemoveNotice(path string, file, notice []byte) []byte {
	// Strip shebang lines from beginning of file
	shebangLines := shebangMatch.Find(file)
	file = shebangMatch.ReplaceAll(file, nil)

	if !c.fileHasCopyrightHeader(file, notice) {
		return nil
	}
	c.Verbosef("removing notice: %s", path)
	removed := c.removeCopyrightHeader(file, notice)
	return c.mergeFileSections(shebangLines, removed)
}
// shebangRemoveNotice explicitly handles files that start with a shebang line.
// This assumes these are not `*.go` source files so has more in common with
// `removeNotice()` than with `goRemoveNotice()`.
shebangRemoveNotice explicitly handles files that start with a shebang line.
This assumes these are not `*.go` source files so has more in common with
`removeNotice()` than with `goRemoveNotice()`.
// shebangRemoveNotice explicitly handles files that start with a shebang line . // This assumes these are not ` * . go ` source files so has more in common with // ` removeNotice () ` than with ` goRemoveNotice () ` .
func (c Copyright) shebangRemoveNotice(path string, file, notice []byte) []byte {
	shebangLines := shebangMatch.Find(file)
	file = shebangMatch.ReplaceAll(file, nil)
	if !c.fileHasCopyrightHeader(file, notice) {
		return nil
	}
	c.Verbosef("removing notice: %s", path)
	removed := c.removeCopyrightHeader(file, notice)
	return c.mergeFileSections(shebangLines, removed)
}
func ( c Copyright ) shebangRemoveNotice ( path string , file , notice [ ] byte ) [ ] byte { shebangLines := shebangMatch . Find ( file ) file = shebangMatch . ReplaceAll ( file , nil ) if ! c . fileHasCopyrightHeader ( file , notice ) { return nil } c . Verbosef ( " " , path ) removed := c . removeCopyrightHeader ( file , notice ) return c . mergeFileSections ( shebangLines , removed ) }
shebangRemoveNotice explicitly handles files that start with a shebang line.
shebangRemoveNotice explicitly handles files that start with a shebang line .
// Strip shebang lines from beginning of file