Skip to content

Commit

Permalink
refactor: move main.go to cmd/world (#13)
Browse files Browse the repository at this point in the history
  • Loading branch information
smsunarto committed Nov 6, 2023
1 parent 9d32651 commit 1f0f86a
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
- name: Set up Docker Build
uses: docker/setup-buildx-action@v2
- name: Install Go
uses: actions/setup-go@v4
Expand All @@ -40,7 +40,7 @@ jobs:
output_name=world_${{ matrix.goos }}_${{ matrix.goarch }}
[ ${{ matrix.goos }} = "windows" ] && output_name+=".exe"
env GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o $output_name
env GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build ./cmd/world -o $output_name
echo "output_name=$output_name" >> $GITHUB_OUTPUT
- name: Compress Build Binary
uses: a7ul/[email protected]
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
- name: Set up Docker Build
uses: docker/setup-buildx-action@v2
- name: Install Go
uses: actions/setup-go@v4
Expand All @@ -34,6 +34,7 @@ jobs:
with:
name: coverage
path: ./coverage.out

upload-codecov:
name: Upload coverage output to Codecov.io
runs-on: ubuntu-latest
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 9 additions & 0 deletions cmd/world/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package main

import (
"pkg.world.dev/world-cli/cmd/world/root"
)

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

import (
tea "github.com/charmbracelet/bubbletea"
Expand Down
4 changes: 2 additions & 2 deletions cmd/root.go → cmd/world/root/root.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package cmd
package root

import (
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"os"
"pkg.world.dev/world-cli/cmd/cardinal"
"pkg.world.dev/world-cli/cmd/world/cardinal"
"pkg.world.dev/world-cli/tea/style"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/version.go → cmd/world/root/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package cmd
package root

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

This file was deleted.

0 comments on commit 1f0f86a

Please sign in to comment.