Skip to content

Commit

Permalink
Fix structure
Browse files Browse the repository at this point in the history
  • Loading branch information
NolanTrem committed Aug 20, 2024
1 parent fabea80 commit 2af4c81
Show file tree
Hide file tree
Showing 307 changed files with 528 additions and 1,740 deletions.
4 changes: 2 additions & 2 deletions r2r_cli/go.mod → go/cli/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ module r2r-cli

go 1.23.0

replace github.com/yourusername/r2r-go-sdk => ../r2r-go-sdk
replace github.com/yourusername/r2r_go_sdk => ../r2r_go_sdk

require (
github.com/spf13/cobra v1.8.1
github.com/yourusername/r2r-go-sdk v0.0.0-00010101000000-000000000000
github.com/yourusername/r2r_go_sdk v0.0.0-00010101000000-000000000000
)

require (
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion r2r_cli/rag_operations.go → go/cli/rag_operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"

"github.com/spf13/cobra"
"github.com/yourusername/r2r-go-sdk/pkg/sdk"
"github.com/yourusername/r2r_go_sdk/pkg/sdk"
)

func init() {
Expand Down
24 changes: 22 additions & 2 deletions r2r_cli/server_operations.go → go/cli/server_operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (
"fmt"
"os/exec"
"runtime"
"runtime/debug"

"github.com/spf13/cobra"
"github.com/yourusername/r2r-go-sdk/pkg/sdk"
"github.com/yourusername/r2r_go_sdk/pkg/sdk"
)

func init() {
Expand Down Expand Up @@ -88,4 +89,23 @@ var healthCmd = &cobra.Command{

// TODO: update

// TODO: version
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version of R2R",
Run: func(cmd *cobra.Command, args []string) {
info, ok := debug.ReadBuildInfo()
if !ok {
fmt.Println("No version information available")
return
}

for _, dep := range info.Deps {
if dep.Path == "github.com/yourusername/r2r_go_sdk" {
fmt.Printf("R2R version: %s\n", dep.Version)
return
}
}

fmt.Println("R2R version information not found")
},
}
File renamed without changes.
3 changes: 3 additions & 0 deletions go/sdk/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/yourusername/r2r_go_sdk

go 1.23.0
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"os"
"testing"

"github.com/yourusername/r2r-go-sdk/pkg/sdk"
"github.com/yourusername/r2r_go_sdk/pkg/sdk"
)

func TestServerStatsIntegration(t *testing.T) {
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.
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.
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.
Loading

0 comments on commit 2af4c81

Please sign in to comment.