Skip to content

Commit

Permalink
Merge pull request #79 from DireLines/main
Browse files Browse the repository at this point in the history
add Version to api package
  • Loading branch information
DireLines authored Feb 1, 2024
2 parents 768598a + 3a0022f commit 4c41b0a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import (
"strings"
)

var Version string

type UserOut struct {
Data *PodData `json:"data"`
Errors []*GraphQLError `json:"errors"`
Expand Down
2 changes: 2 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"os"

"cli/api"
"cli/cmd/config"
"cli/cmd/croc"

Expand All @@ -25,6 +26,7 @@ var RootCmd = &cobra.Command{
// This is called by main.main(). It only needs to happen once to the rootCmd.
func Execute(ver string) {
version = ver
api.Version = ver
err := RootCmd.Execute()
if err != nil {
os.Exit(1)
Expand Down

0 comments on commit 4c41b0a

Please sign in to comment.