Skip to content

Commit b0e37d9

Browse files
Merge branch 'main' into feature/config-volumes-remove
2 parents 5b27405 + 74145dd commit b0e37d9

File tree

11 files changed

+37
-21
lines changed

11 files changed

+37
-21
lines changed

.github/workflows/golangci-lint.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@ jobs:
2525
go-version-file: go.mod
2626

2727
- name: golangci-lint
28-
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # 8.0.0
28+
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
2929
with:
30-
version: v2.4.0
30+
version: v2.10.1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ Plugin SDKs are built using the [mcpd plugin Protocol Buffers specification](htt
135135
## 💻 Development
136136

137137
If you are developing `mcpd`, you will need:
138-
- [**Go**](https://go.dev/doc/install) (v1.25.6+ recommended)
138+
- [**Go**](https://go.dev/doc/install) (v1.26.0+ recommended)
139139

140140
Build local code:
141141
```bash

cmd/config/args/remove.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ func (c *RemoveCmd) run(cmd *cobra.Command, args []string) error {
8888

8989
if _, err := fmt.Fprintf(
9090
cmd.OutOrStdout(),
91-
"✓ Arguments removed for server '%s' (operation: %s): %v\n", serverName, string(res), slices.Collect(maps.Keys(argMap)),
91+
"✓ Arguments removed for server '%s' (operation: %s): %v\n",
92+
serverName,
93+
string(res),
94+
slices.Collect(maps.Keys(argMap)),
9295
); err != nil {
9396
return err
9497
}

cmd/config/args/set.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,11 @@ func (c *SetCmd) run(cmd *cobra.Command, args []string) error {
9999

100100
if _, err := fmt.Fprintf(
101101
cmd.OutOrStdout(),
102-
"✓ Startup arguments %s for server '%s' (operation: %s): %v\n", operation, serverName, string(res), normalizedArgs,
102+
"✓ Startup arguments %s for server '%s' (operation: %s): %v\n",
103+
operation,
104+
serverName,
105+
string(res),
106+
normalizedArgs,
103107
); err != nil {
104108
return err
105109
}

cmd/config/env/remove.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ func (c *RemoveCmd) run(cmd *cobra.Command, args []string) error {
7777

7878
if _, err := fmt.Fprintf(
7979
cmd.OutOrStdout(),
80-
"✓ Environment variables removed for server '%s' (operation: %s): %v\n", serverName, string(res), slices.Collect(maps.Keys(envMap)),
80+
"✓ Environment variables removed for server '%s' (operation: %s): %v\n",
81+
serverName,
82+
string(res),
83+
slices.Collect(maps.Keys(envMap)),
8184
); err != nil {
8285
return err
8386
}

cmd/config/env/set.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,10 @@ func (c *SetCmd) run(cmd *cobra.Command, args []string) error {
8787

8888
if _, err := fmt.Fprintf(
8989
cmd.OutOrStdout(),
90-
"✓ Environment variables set for server '%s' (operation: %s): %v\n", serverName, string(res), slices.Collect(maps.Keys(envMap)),
90+
"✓ Environment variables set for server '%s' (operation: %s): %v\n",
91+
serverName,
92+
string(res),
93+
slices.Collect(maps.Keys(envMap)),
9194
); err != nil {
9295
return err
9396
}

cmd/daemon.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,43 +1060,43 @@ func (c *DaemonCmd) formatConfigInfo(addr string) string {
10601060

10611061
// API configuration (only show if non-default).
10621062
if addr != "" && addr != "0.0.0.0:8090" {
1063-
info.WriteString(fmt.Sprintf(" API address:\t%s\n", addr))
1063+
fmt.Fprintf(&info, " API address:\t%s\n", addr)
10641064
}
10651065

10661066
// CORS configuration.
10671067
if c.config.cors.enable {
1068-
info.WriteString(fmt.Sprintf(" CORS enabled:\t%v (origins: %s)\n",
1068+
fmt.Fprintf(&info, " CORS enabled:\t%v (origins: %s)\n",
10691069
c.config.cors.enable,
1070-
strings.Join(c.config.cors.origins, ", ")))
1070+
strings.Join(c.config.cors.origins, ", "))
10711071

10721072
if len(c.config.cors.methods) > 0 {
1073-
info.WriteString(fmt.Sprintf(" CORS methods:\t%s\n",
1074-
strings.Join(c.config.cors.methods, ", ")))
1073+
fmt.Fprintf(&info, " CORS methods:\t%s\n",
1074+
strings.Join(c.config.cors.methods, ", "))
10751075
}
10761076

10771077
if c.config.cors.credentials {
10781078
info.WriteString(" CORS credentials:\ttrue\n")
10791079
}
10801080

10811081
if c.config.cors.maxAge != "" {
1082-
info.WriteString(fmt.Sprintf(" CORS max age:\t%s\n", c.config.cors.maxAge))
1082+
fmt.Fprintf(&info, " CORS max age:\t%s\n", c.config.cors.maxAge)
10831083
}
10841084
}
10851085

10861086
// Timeout configuration.
10871087
if v := c.config.timeout.apiShutdown; v != "" && v != daemon.DefaultAPIShutdownTimeout().String() {
1088-
info.WriteString(fmt.Sprintf(" API shutdown timeout:\t%s\n", v))
1088+
fmt.Fprintf(&info, " API shutdown timeout:\t%s\n", v)
10891089
}
10901090
if v := c.config.timeout.mcpInit; v != "" && v != daemon.DefaultClientInitTimeout().String() {
1091-
info.WriteString(fmt.Sprintf(" MCP init timeout:\t%s\n", v))
1091+
fmt.Fprintf(&info, " MCP init timeout:\t%s\n", v)
10921092
}
10931093

10941094
if v := c.config.timeout.healthCheck; v != "" && v != daemon.DefaultHealthCheckTimeout().String() {
1095-
info.WriteString(fmt.Sprintf(" MCP health check timeout:\t%s\n", v))
1095+
fmt.Fprintf(&info, " MCP health check timeout:\t%s\n", v)
10961096
}
10971097

10981098
if v := c.config.interval.healthCheck; v != "" && v != daemon.DefaultHealthCheckInterval().String() {
1099-
info.WriteString(fmt.Sprintf(" MCP health check interval:\t%s\n", v))
1099+
fmt.Fprintf(&info, " MCP health check interval:\t%s\n", v)
11001100
}
11011101

11021102
return info.String()

docs/requirements.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ To use `mcpd`, ensure the following tools are installed:
55
| Tool | Purpose | URL |
66
|----------------|-------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|
77
| `Docker` | For running MCP servers as Docker containers | [https://www.docker.com/products/docker-desktop/](https://www.docker.com/products/docker-desktop/) |
8-
| `Go >= 1.25.6` | Required for building `mcpd` and running tests | [https://go.dev/doc/install](https://go.dev/doc/install) |
8+
| `Go >= 1.26.0` | Required for building `mcpd` and running tests | [https://go.dev/doc/install](https://go.dev/doc/install) |
99
| `uv` | For running `uvx` Python packages in `mcpd`, and local docs | [https://docs.astral.sh/uv/getting-started/installation/](https://docs.astral.sh/uv/getting-started/installation/) |
1010
| `npx` | For running JavaScript/TypeScript packages in `mcpd` | [https://docs.npmjs.com/downloading-and-installing-node-js-and-npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) |
1111

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/mozilla-ai/mcpd
22

3-
go 1.25.6
3+
go 1.26.0
44

55
require (
66
github.com/BurntSushi/toml v1.5.0

internal/config/daemon_config.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,10 @@ func (a *APIConfigSection) Validate() error {
262262
if *a.Addr == "" {
263263
validationErrors = append(validationErrors, fmt.Errorf("API address cannot be empty"))
264264
} else if !isValidAddr(*a.Addr) {
265-
validationErrors = append(validationErrors, fmt.Errorf("API address \"%s\" appears to be invalid (expected format: host:port)", *a.Addr))
265+
validationErrors = append(
266+
validationErrors,
267+
fmt.Errorf("API address \"%s\" appears to be invalid (expected format: host:port)", *a.Addr),
268+
)
266269
}
267270
}
268271

0 commit comments

Comments
 (0)