Skip to content

Commit 5fe28ea

Browse files
committed
change from internal to src
1 parent f6c3ba0 commit 5fe28ea

File tree

80 files changed

+128
-128
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+128
-128
lines changed

examples/cli_transport/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"os"
77
"time"
88

9-
. "github.com/universal-tool-calling-protocol/go-utcp/internal/providers"
10-
. "github.com/universal-tool-calling-protocol/go-utcp/internal/transports/cli"
9+
. "github.com/universal-tool-calling-protocol/go-utcp/src/providers"
10+
. "github.com/universal-tool-calling-protocol/go-utcp/src/transports/cli"
1111
)
1212

1313
func main() {

examples/graphql_transport/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import (
1414
"strings"
1515
"time"
1616

17-
providers "github.com/universal-tool-calling-protocol/go-utcp/internal/providers"
18-
transports "github.com/universal-tool-calling-protocol/go-utcp/internal/transports/graphql"
17+
providers "github.com/universal-tool-calling-protocol/go-utcp/src/providers"
18+
transports "github.com/universal-tool-calling-protocol/go-utcp/src/transports/graphql"
1919
)
2020

2121
// --- Mock server implementation ---

examples/grpc_client/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"time"
1111

1212
utcp "github.com/universal-tool-calling-protocol/go-utcp"
13-
"github.com/universal-tool-calling-protocol/go-utcp/internal/grpcpb"
13+
"github.com/universal-tool-calling-protocol/go-utcp/src/grpcpb"
1414
"google.golang.org/grpc"
1515
"google.golang.org/grpc/reflection"
1616
)

examples/grpc_transport/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import (
88
"strconv"
99
"time"
1010

11-
providers "github.com/universal-tool-calling-protocol/go-utcp/internal/providers"
12-
transports "github.com/universal-tool-calling-protocol/go-utcp/internal/transports/grpc"
11+
providers "github.com/universal-tool-calling-protocol/go-utcp/src/providers"
12+
transports "github.com/universal-tool-calling-protocol/go-utcp/src/transports/grpc"
1313

14-
"github.com/universal-tool-calling-protocol/go-utcp/internal/grpcpb"
14+
"github.com/universal-tool-calling-protocol/go-utcp/src/grpcpb"
1515
"google.golang.org/grpc"
1616
"google.golang.org/grpc/reflection"
1717
)

examples/http_client/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ func startServer(addr string) {
3939
data, err := os.ReadFile("tools.json")
4040
if err != nil {
4141
log.Printf("Failed to read tools.json: %v", err)
42-
http.Error(w, fmt.Sprintf("failed to read tools.json: %v", err), http.StatusInternalServerError)
42+
http.Error(w, fmt.Sprintf("failed to read tools.json: %v", err), http.StatussrcServerError)
4343
return
4444
}
4545
var discoveryResponse map[string]interface{}
4646
if err := json.Unmarshal(data, &discoveryResponse); err != nil {
4747
log.Printf("Failed to unmarshal tools.json: %v", err)
48-
http.Error(w, fmt.Sprintf("invalid tools.json format: %v", err), http.StatusInternalServerError)
48+
http.Error(w, fmt.Sprintf("invalid tools.json format: %v", err), http.StatussrcServerError)
4949
return
5050
}
5151

examples/http_transport/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"time"
1010

1111
"github.com/gorilla/mux"
12-
providers "github.com/universal-tool-calling-protocol/go-utcp/internal/providers"
13-
transports "github.com/universal-tool-calling-protocol/go-utcp/internal/transports/http"
12+
providers "github.com/universal-tool-calling-protocol/go-utcp/src/providers"
13+
transports "github.com/universal-tool-calling-protocol/go-utcp/src/transports/http"
1414
)
1515

1616
// Tool metadata
@@ -77,7 +77,7 @@ func listToolsHandler(w http.ResponseWriter, r *http.Request) {
7777
}
7878

7979
if err := json.NewEncoder(w).Encode(response); err != nil {
80-
http.Error(w, err.Error(), http.StatusInternalServerError)
80+
http.Error(w, err.Error(), http.StatussrcServerError)
8181
}
8282
}
8383

examples/mcp_transport/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
"strings"
99
"time"
1010

11-
providers "github.com/universal-tool-calling-protocol/go-utcp/internal/providers"
12-
transports "github.com/universal-tool-calling-protocol/go-utcp/internal/transports/mcp"
11+
providers "github.com/universal-tool-calling-protocol/go-utcp/src/providers"
12+
transports "github.com/universal-tool-calling-protocol/go-utcp/src/transports/mcp"
1313
)
1414

1515
func main() {

examples/sse_client/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func startServer(addr string) {
2020
// Open the JSON file
2121
f, err := os.Open("tools.json")
2222
if err != nil {
23-
http.Error(w, "could not load tools.json: "+err.Error(), http.StatusInternalServerError)
23+
http.Error(w, "could not load tools.json: "+err.Error(), http.StatussrcServerError)
2424
return
2525
}
2626
defer f.Close()
@@ -40,7 +40,7 @@ func startServer(addr string) {
4040
w.Header().Set("Cache-Control", "no-cache")
4141
flusher, ok := w.(http.Flusher)
4242
if !ok {
43-
http.Error(w, "streaming unsupported", http.StatusInternalServerError)
43+
http.Error(w, "streaming unsupported", http.StatussrcServerError)
4444
return
4545
}
4646
parts := []string{"Hello,", fmt.Sprintf(" %s!", name)}

examples/sse_transport/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import (
99
"strings"
1010
"time"
1111

12-
"github.com/universal-tool-calling-protocol/go-utcp/internal/providers"
13-
transports "github.com/universal-tool-calling-protocol/go-utcp/internal/transports/sse"
12+
"github.com/universal-tool-calling-protocol/go-utcp/src/providers"
13+
transports "github.com/universal-tool-calling-protocol/go-utcp/src/transports/sse"
1414
)
1515

1616
func main() {
@@ -52,7 +52,7 @@ func startMockServer(addr string) {
5252

5353
flusher, ok := w.(http.Flusher)
5454
if !ok {
55-
http.Error(w, "Streaming unsupported!", http.StatusInternalServerError)
55+
http.Error(w, "Streaming unsupported!", http.StatussrcServerError)
5656
return
5757
}
5858

examples/streamable_client/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"time"
1010

1111
utcp "github.com/universal-tool-calling-protocol/go-utcp"
12-
. "github.com/universal-tool-calling-protocol/go-utcp/internal/concepts"
12+
. "github.com/universal-tool-calling-protocol/go-utcp/src/concepts"
1313
)
1414

1515
func startStreamingServer(addr string) {
@@ -52,7 +52,7 @@ func startStreamingServer(addr string) {
5252
w.Header().Set("Content-Type", "application/json")
5353
flusher, ok := w.(http.Flusher)
5454
if !ok {
55-
http.Error(w, "streaming unsupported", http.StatusInternalServerError)
55+
http.Error(w, "streaming unsupported", http.StatussrcServerError)
5656
return
5757
}
5858

0 commit comments

Comments
 (0)