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

refactor: move main.go to cmd/world #13

Merged
merged 2 commits into from
Nov 6, 2023
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
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.