Skip to content

Commit

Permalink
change name
Browse files Browse the repository at this point in the history
  • Loading branch information
kmdkuk committed Jun 6, 2021
1 parent 99c0092 commit 7ca20b7
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test_and_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Ensure go.mod is already tidied
run: go mod tidy && git diff -s --exit-code go.sum
- name: build
run: make bin/go-cli-template
run: make bin/git-push-notifier
- name: test
run: make test
notification:
Expand Down
10 changes: 5 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
project_name: go-cli-template
project_name: git-push-notifier
env:
- GO111MODULE=on
before:
hooks:
- go mod tidy
builds:
- main: .
binary: go-cli-template
binary: git-push-notifier
ldflags:
- -s -w
- -X github.com/kmdkuk/go-cli-template/version.Version={{.Version}}
- -X github.com/kmdkuk/go-cli-template/version.Revision={{.ShortCommit}}
- -X github.com/kmdkuk/go-cli-template/version.BuildDate={{.Date}}
- -X github.com/kmdkuk/git-push-notifier/version.Version={{.Version}}
- -X github.com/kmdkuk/git-push-notifier/version.Revision={{.ShortCommit}}
- -X github.com/kmdkuk/git-push-notifier/version.BuildDate={{.Date}}
goos:
- windows
- darwin
Expand Down
2 changes: 1 addition & 1 deletion .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ ifndef CGO_LDFLAGS
export CGO_LDFLAGS := $(LDFLAGS)
endif

GO_LDFLAGS := -X github.com/kmdkuk/go-cli-template/version.Revision=$(REVISION) $(GO_LDFLAGS)
GO_LDFLAGS := -X github.com/kmdkuk/go-cli-template/version.BuildDate=$(BUILD_DATE) $(GO_LDFLAGS)
GO_LDFLAGS := -X github.com/kmdkuk/git-push-notifier/version.Revision=$(REVISION) $(GO_LDFLAGS)
GO_LDFLAGS := -X github.com/kmdkuk/git-push-notifier/version.BuildDate=$(BUILD_DATE) $(GO_LDFLAGS)
DEV_LDFLAGS := $(GO_LDFLAGS)
GO_LDFLAGS := -X github.com/kmdkuk/go-cli-template/version.Version=$(VERSION) $(GO_LDFLAGS)
GO_LDFLAGS := -X github.com/kmdkuk/git-push-notifier/version.Version=$(VERSION) $(GO_LDFLAGS)

bin/go-cli-template: $(BUILD_FILES)
bin/git-push-notifier: $(BUILD_FILES)
go build -trimpath -ldflags "$(GO_LDFLAGS)" -o "$@" .

dev: $(BUILD_FILES)
go build -trimpath -ldflags "$(DEV_LDFLAGS)" -o "bin/go-cli-template-dev" .
go build -trimpath -ldflags "$(DEV_LDFLAGS)" -o "bin/git-push-notifier-dev" .

test:
go test ./...
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# go-cli-template
![CI](https://github.com/kmdkuk/go-cli-template/workflows/CI/badge.svg)
# git-push-notifier
![CI](https://github.com/kmdkuk/git-push-notifier/workflows/CI/badge.svg)

A template to start writing CLI easily in Go language.
Please change "go-cli-template" to your project name and use it.
Please change "git-push-notifier" to your project name and use it.

By setting your Slack webhook url in secrets.SLACK_WEBHOOK,
you can also notify slack of test results.
Expand Down
10 changes: 5 additions & 5 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ THE SOFTWARE.
package cmd

import (
"github.com/kmdkuk/go-cli-template/log"
"github.com/kmdkuk/git-push-notifier/log"
"github.com/spf13/cobra"

homedir "github.com/mitchellh/go-homedir"
Expand All @@ -33,7 +33,7 @@ var cfgFile string

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "go-cli-template",
Use: "git-push-notifier",
Short: "A brief description of your application",
Long: `A longer description that spans multiple lines and likely contains
examples and usage of using your application. For example:
Expand Down Expand Up @@ -61,7 +61,7 @@ func init() {
// Cobra supports persistent flags, which, if defined here,
// will be global for your application.

rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.go-cli-template.yaml)")
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.git-push-notifier.yaml)")

// Cobra also supports local flags, which will only run
// when this action is called directly.
Expand All @@ -80,9 +80,9 @@ func initConfig() {
log.Fatal(err)
}

// Search config in home directory with name ".go-cli-template" (without extension).
// Search config in home directory with name ".git-push-notifier" (without extension).
viper.AddConfigPath(home)
viper.SetConfigName(".go-cli-template")
viper.SetConfigName(".git-push-notifier")
}

viper.AutomaticEnv() // read in environment variables that match
Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package cmd
import (
"fmt"

"github.com/kmdkuk/go-cli-template/version"
"github.com/kmdkuk/git-push-notifier/version"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/kmdkuk/go-cli-template
module github.com/kmdkuk/git-push-notifier

go 1.14

Expand Down
2 changes: 1 addition & 1 deletion log/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"path/filepath"
"runtime"

"github.com/kmdkuk/go-cli-template/version"
"github.com/kmdkuk/git-push-notifier/version"
)

type Level int
Expand Down
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ THE SOFTWARE.
package main

import (
"github.com/kmdkuk/go-cli-template/cmd"
"github.com/kmdkuk/go-cli-template/log"
"github.com/kmdkuk/git-push-notifier/cmd"
"github.com/kmdkuk/git-push-notifier/log"
)

func main() {
Expand Down

0 comments on commit 7ca20b7

Please sign in to comment.