diff --git a/README.md b/README.md index a34e606..d9a7adb 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ Languages: - Golang - Make - Python +- Protobuf - Shell - YAML @@ -30,7 +31,7 @@ brew install liamawhite/licenser/licenser To install on Ubuntu/Debian, use `wget`. ```sh -wget -c https://github.com/liamawhite/licenser/releases/download/v0.3.3/licenser_0.3.3_Linux_x86_64.tar.gz -O - | sudo tar -xz -C /usr/bin +wget -c https://github.com/liamawhite/licenser/releases/download/v${VERSION}/licenser_${VERSION}_Linux_x86_64.tar.gz -O - | sudo tar -xz -C /usr/bin ``` To install on other platforms, download from the [releases section](https://github.com/liamawhite/licenser/releases). diff --git a/pkg/file/mutator.go b/pkg/file/mutator.go index ed67904..02fb330 100644 --- a/pkg/file/mutator.go +++ b/pkg/file/mutator.go @@ -136,6 +136,8 @@ func identifyLanguageStyle(path string) *languageStyle { return commentStyles["golang"] case ".py": return commentStyles["python"] + case ".proto": + return commentStyles["protobuf"] case ".sh", ".patch": return commentStyles["shell"] case ".yaml", ".yml": diff --git a/pkg/file/style.go b/pkg/file/style.go index 43ab572..301ac4e 100644 --- a/pkg/file/style.go +++ b/pkg/file/style.go @@ -28,12 +28,13 @@ type languageStyle struct { } var commentStyles = map[string]*languageStyle{ - "bazel": &languageStyle{isBlock: false, comment: "#"}, - "c": &languageStyle{isBlock: false, comment: "//"}, - "docker": &languageStyle{isBlock: false, comment: "#"}, - "golang": &languageStyle{isBlock: false, comment: "//"}, - "make": &languageStyle{isBlock: false, comment: "#"}, - "python": &languageStyle{isBlock: false, comment: "#"}, - "shell": &languageStyle{isBlock: false, comment: "#"}, - "yaml": &languageStyle{isBlock: false, comment: "#"}, + "bazel": &languageStyle{isBlock: false, comment: "#"}, + "c": &languageStyle{isBlock: false, comment: "//"}, + "docker": &languageStyle{isBlock: false, comment: "#"}, + "golang": &languageStyle{isBlock: false, comment: "//"}, + "make": &languageStyle{isBlock: false, comment: "#"}, + "protobuf": &languageStyle{isBlock: false, comment: "//"}, + "python": &languageStyle{isBlock: false, comment: "#"}, + "shell": &languageStyle{isBlock: false, comment: "#"}, + "yaml": &languageStyle{isBlock: false, comment: "#"}, }