Skip to content

Commit

Permalink
Update tools/addlicense/utils.go
Browse files Browse the repository at this point in the history
Co-authored-by: Ivan Mikheykin <[email protected]>
Signed-off-by: Nikita Korolev <[email protected]>
  • Loading branch information
universal-itengineer and diafour authored Jun 14, 2024
1 parent 302aba2 commit f2c706c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/addlicense/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ func addLicenseToFile(filePath, license string) Message {

if !lic {
if isShebangLine(firstLine) {
newContent.Write([]byte(firstLine + "\n\n" + license + restOfFile))
newContent.WriteString(firstLine)
newContent.WriteString("\n\n")
newContent.WriteString(license)
newContent.WriteString(restOfFile)
} else {
newContent.Write([]byte(license + restOfFile))
}
Expand Down

0 comments on commit f2c706c

Please sign in to comment.