Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update package imports to use internal package structure #145

Merged
merged 1 commit into from
Apr 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ builds:
binary: notify_slack
ldflags:
- -s -w
- -X github.com/catatsuy/notify_slack/cli.Version=v{{.Version}}
- -X github.com/catatsuy/notify_slack/internal/cli.Version=v{{.Version}}
env:
- CGO_ENABLED=0
goarch:
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ all: bin/notify_slack bin/output
go.mod go.sum:
go mod tidy

bin/notify_slack: cmd/notify_slack/main.go slack/*.go throttle/*.go config/*.go cli/*.go go.mod go.sum
go build -ldflags "-X github.com/catatsuy/notify_slack/cli.Version=`git rev-list HEAD -n1`" -o bin/notify_slack cmd/notify_slack/main.go
bin/notify_slack: cmd/notify_slack/main.go internal/slack/*.go internal/throttle/*.go internal/config/*.go internal/cli/*.go go.mod go.sum
go build -ldflags "-X github.com/catatsuy/notify_slack/internal/cli.Version=`git rev-list HEAD -n1`" -o bin/notify_slack cmd/notify_slack/main.go

bin/output: cmd/output/main.go
go build -o bin/output cmd/output/main.go
Expand Down
2 changes: 1 addition & 1 deletion cmd/notify_slack/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"os"

"github.com/catatsuy/notify_slack/cli"
"github.com/catatsuy/notify_slack/internal/cli"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions cli/cli.go → internal/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"syscall"
"time"

"github.com/catatsuy/notify_slack/config"
"github.com/catatsuy/notify_slack/slack"
"github.com/catatsuy/notify_slack/throttle"
"github.com/catatsuy/notify_slack/internal/config"
"github.com/catatsuy/notify_slack/internal/slack"
"github.com/catatsuy/notify_slack/internal/throttle"
"golang.org/x/term"
)

Expand Down
4 changes: 2 additions & 2 deletions cli/cli_test.go → internal/cli/cli_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"strings"
"testing"

"github.com/catatsuy/notify_slack/config"
"github.com/catatsuy/notify_slack/slack"
"github.com/catatsuy/notify_slack/internal/config"
"github.com/catatsuy/notify_slack/internal/slack"
)

type fakeSlackClient struct {
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion config/config_test.go → internal/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"testing"
"time"

. "github.com/catatsuy/notify_slack/config"
. "github.com/catatsuy/notify_slack/internal/config"
)

func TestLoadTOML(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion slack/client_test.go → internal/slack/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"strings"
"testing"

. "github.com/catatsuy/notify_slack/slack"
. "github.com/catatsuy/notify_slack/internal/slack"
)

func TestNewClient_badURL(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading