Skip to content

Commit

Permalink
Move CLI entry point
Browse files Browse the repository at this point in the history
Signed-off-by: Daichi Sakaue <[email protected]>
  • Loading branch information
yokaze committed Oct 17, 2024
1 parent a5f5537 commit ffdfbb0
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ clean:
.PHONY: build
build: ## Build network-policy-viewer
mkdir -p $(BIN_DIR)
go build -trimpath -ldflags "-w -s" -o $(BIN_DIR)/npv main.go
go build -trimpath -ldflags "-w -s" -o $(BIN_DIR)/npv ./cmd/npv

.PHONY: check-generate
check-generate:
Expand Down
7 changes: 7 additions & 0 deletions cmd/npv/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "github.com/cybozu-go/network-policy-viewer/cmd/npv/sub"

func main() {
sub.Execute()
}
2 changes: 1 addition & 1 deletion cmd/dump.go → cmd/npv/sub/dump.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package sub

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion cmd/helper.go → cmd/npv/sub/helper.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package sub

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion cmd/list.go → cmd/npv/sub/list.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package sub

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion cmd/root.go → cmd/npv/sub/root.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package sub

import (
"fmt"
Expand Down
9 changes: 0 additions & 9 deletions main.go

This file was deleted.

0 comments on commit ffdfbb0

Please sign in to comment.