Skip to content
Open
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
49 changes: 49 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Makefile for NVCF CLI

# Go parameters
GOCMD=go
GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOTEST=$(GOCMD) test
GOVET=$(GOCMD) vet
BINARY_NAME=nvcf
GOFILES=$(shell find . -name '*.go' -not -path "./vendor/*")

# Linting
GOLINT=golangci-lint

.PHONY: all build clean test vet lint fmt

all: build

build:
$(GOBUILD) -o $(BINARY_NAME)

clean:
$(GOCLEAN)
rm -f $(BINARY_NAME)

test:
$(GOTEST) ./...

vet:
$(GOVET) ./...

lint:
$(GOLINT) run

fmt:
gofmt -s -w $(GOFILES)

# Installs golangci-lint
install-lint:
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.54.2

# Runs all checks
check: fmt vet lint test

# Builds for multiple platforms
build-all:
GOOS=linux GOARCH=amd64 $(GOBUILD) -o $(BINARY_NAME)-linux-amd64
GOOS=darwin GOARCH=amd64 $(GOBUILD) -o $(BINARY_NAME)-darwin-amd64
GOOS=windows GOARCH=amd64 $(GOBUILD) -o $(BINARY_NAME)-windows-amd64.exe
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ NVCF is a command-line interface (CLI) tool for managing and interacting with NV
To install the NVCF CLI, you need to have Go installed on your system. Then, you can use the following command:

```bash
go install github.com/tmc/nvcf@latest
go install github.com/brevdev/nvcf@latest
```

## Usage
Expand Down Expand Up @@ -72,7 +72,7 @@ Key files:
The project uses the following main dependencies:

- `github.com/spf13/cobra`: For building the CLI command structure
- `github.com/tmc/nvcf-go`: NVIDIA Cloud Functions Go SDK
- `github.com/brevdev/nvcf-go`: NVIDIA Cloud Functions Go SDK
- `github.com/fatih/color`: For color-coded output
- `github.com/olekukonko/tablewriter`: For table-formatted output

Expand All @@ -94,11 +94,11 @@ This project is licensed under the [MIT License](LICENSE).

## Badges

[![Go Report Card](https://goreportcard.com/badge/github.com/tmc/nvcf)](https://goreportcard.com/report/github.com/tmc/nvcf)
[![GoDoc](https://godoc.org/github.com/tmc/nvcf?status.svg)](https://godoc.org/github.com/tmc/nvcf)
[![Go Report Card](https://goreportcard.com/badge/github.com/brevdev/nvcf)](https://goreportcard.com/report/github.com/brevdev/nvcf)
[![GoDoc](https://godoc.org/github.com/brevdev/nvcf?status.svg)](https://godoc.org/github.com/brevdev/nvcf)

## Support

For issues, feature requests, or questions, please open an issue on the [GitHub repository](https://github.com/tmc/nvcf/issues).
For issues, feature requests, or questions, please open an issue on the [GitHub repository](https://github.com/brevdev/nvcf/issues).

For more information about NVIDIA Cloud Functions, visit the [official documentation](https://docs.nvidia.com/cloud-functions/)
For more information about NVIDIA Cloud Functions, visit the [official documentation](https://docs.nvidia.com/cloud-functions/)
4 changes: 2 additions & 2 deletions cmd/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"os/exec"
"strings"

"github.com/brevdev/nvcf/config"
"github.com/brevdev/nvcf/output"
"github.com/spf13/cobra"
"github.com/tmc/nvcf/config"
"github.com/tmc/nvcf/output"
)

func AuthCmd() *cobra.Command {
Expand Down
6 changes: 3 additions & 3 deletions cmd/function.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"fmt"
"os"

"github.com/brevdev/nvcf/api"
"github.com/brevdev/nvcf/config"
"github.com/brevdev/nvcf/output"
"github.com/spf13/cobra"
"github.com/tmc/nvcf-go"
"github.com/tmc/nvcf/api"
"github.com/tmc/nvcf/config"
"github.com/tmc/nvcf/output"
)

func FunctionCmd() *cobra.Command {
Expand Down
6 changes: 3 additions & 3 deletions cmd/function_create.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package cmd
import (
"fmt"

"github.com/brevdev/nvcf/api"
"github.com/brevdev/nvcf/config"
"github.com/brevdev/nvcf/output"
"github.com/spf13/cobra"
"github.com/tmc/nvcf-go"
"github.com/tmc/nvcf/api"
"github.com/tmc/nvcf/config"
"github.com/tmc/nvcf/output"
)

func functionCreateCmd() *cobra.Command {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/tmc/nvcf
module github.com/brevdev/nvcf

go 1.22.5

require (
github.com/fatih/color v1.17.0
github.com/olekukonko/tablewriter v0.0.5
github.com/spf13/cobra v1.8.1
github.com/tmc/nvcf-go v0.1.0-alpha.1
github.com/tmc/nvcf-go v0.1.0-alpha.2
)

require (
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ github.com/tidwall/sjson v1.2.5 h1:kLy8mja+1c9jlljvWTlSazM7cKDRfJuR/bOJhcY5NcY=
github.com/tidwall/sjson v1.2.5/go.mod h1:Fvgq9kS/6ociJEDnK0Fk1cpYF4FIW6ZF7LAe+6jwd28=
github.com/tmc/nvcf-go v0.1.0-alpha.1 h1:zMeJF4lIfl2/k+YS38ofPrMhhmmYxzindf2MJ1djftY=
github.com/tmc/nvcf-go v0.1.0-alpha.1/go.mod h1:M9raLLBCc/qfx6iy8b42LlT/sU5rmhUEe6xkqxc8KKA=
github.com/tmc/nvcf-go v0.1.0-alpha.2 h1:KVCmVO1Ac+DGtfDYAg4SiKjc38ucfKFXSqN1NZdH7TI=
github.com/tmc/nvcf-go v0.1.0-alpha.2/go.mod h1:M9raLLBCc/qfx6iy8b42LlT/sU5rmhUEe6xkqxc8KKA=
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"os"

"github.com/brevdev/nvcf/cmd"
"github.com/spf13/cobra"
"github.com/tmc/nvcf/cmd"
)

func main() {
Expand Down