diff --git a/Makefile b/Makefile index 9d5d515..f7935b4 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ ASMFLAGS = all= CGO_ENABLED = 0 # Change these variables as necessary. -MAIN_PACKAGE_PATH := ./cmd/gommitlint +MAIN_PACKAGE_PATH := ./ DIR = ./dist EXECUTABLE = gommitlint SHELL := /bin/bash # Use bash syntax diff --git a/cmd/gommitlint/root.go b/cmd/root.go similarity index 94% rename from cmd/gommitlint/root.go rename to cmd/root.go index 6157b93..5cfee8d 100644 --- a/cmd/gommitlint/root.go +++ b/cmd/root.go @@ -3,8 +3,7 @@ // // SPDX-License-Identifier: MPL-2.0 -// Package main provides CLI commands. -package main +package cmd import ( "context" diff --git a/cmd/gommitlint/validate.go b/cmd/validate.go similarity index 99% rename from cmd/gommitlint/validate.go rename to cmd/validate.go index 9d9259b..1ddc2a4 100755 --- a/cmd/gommitlint/validate.go +++ b/cmd/validate.go @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: MPL-2.0 -package main +package cmd import ( "errors" diff --git a/docs/usage.adoc b/docs/usage.adoc index 66c2d7f..4eccd93 100644 --- a/docs/usage.adoc +++ b/docs/usage.adoc @@ -8,7 +8,7 @@ To install gommitlint you can download a https://github.com/itiquette/gommitlint [source,bash] ---- -go install github.com/itiquette/gommitlint/cmd/gommitlint@latest +go install github.com/itiquette/gommitlint/cmd@latest ---- Third option is to run it as a container: diff --git a/cmd/gommitlint/main.go b/main.go similarity index 67% rename from cmd/gommitlint/main.go rename to main.go index c80f779..7e0a8ab 100755 --- a/cmd/gommitlint/main.go +++ b/main.go @@ -4,6 +4,8 @@ package main +import "github.com/itiquette/gommitlint/cmd" + var ( version = "dev" commit = "none" @@ -11,5 +13,5 @@ var ( ) func main() { - Execute(version, commit, date) + cmd.Execute(version, commit, date) }