fix: apply gofmt to schema.go and server_test.go
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
69d82f060b
commit
6fbf7ea829
2 changed files with 11 additions and 12 deletions
|
|
@ -9,12 +9,12 @@ import (
|
||||||
|
|
||||||
// SchemaField describes a single configuration field.
|
// SchemaField describes a single configuration field.
|
||||||
type SchemaField struct {
|
type SchemaField struct {
|
||||||
Key string `json:"key"`
|
Key string `json:"key"`
|
||||||
Label string `json:"label"`
|
Label string `json:"label"`
|
||||||
Group string `json:"group,omitempty"`
|
Group string `json:"group,omitempty"`
|
||||||
Type string `json:"type"`
|
Type string `json:"type"`
|
||||||
Secret bool `json:"secret"`
|
Secret bool `json:"secret"`
|
||||||
Default interface{} `json:"default"`
|
Default interface{} `json:"default"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// SchemaSection describes a top-level configuration section.
|
// SchemaSection describes a top-level configuration section.
|
||||||
|
|
|
||||||
|
|
@ -198,10 +198,10 @@ func TestBuildSchema_Labels(t *testing.T) {
|
||||||
schema := BuildSchema(config.DefaultConfig())
|
schema := BuildSchema(config.DefaultConfig())
|
||||||
|
|
||||||
wantLabels := map[string]string{
|
wantLabels := map[string]string{
|
||||||
"api_key": "API Key",
|
"api_key": "API Key",
|
||||||
"base_url": "Base URL",
|
"base_url": "Base URL",
|
||||||
"defaults.max_tokens": "Max Tokens",
|
"defaults.max_tokens": "Max Tokens",
|
||||||
"slack.bot_token": "Bot Token",
|
"slack.bot_token": "Bot Token",
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, sec := range schema.Sections {
|
for _, sec := range schema.Sections {
|
||||||
|
|
@ -338,7 +338,7 @@ func TestBuildSchema_DefaultValues(t *testing.T) {
|
||||||
key string
|
key string
|
||||||
want interface{}
|
want interface{}
|
||||||
}{
|
}{
|
||||||
{"agents", "defaults.max_tokens", float64(8192)}, // JSON numbers → float64
|
{"agents", "defaults.max_tokens", float64(8192)}, // JSON numbers → float64
|
||||||
{"agents", "defaults.context_window", float64(128000)},
|
{"agents", "defaults.context_window", float64(128000)},
|
||||||
{"agents", "defaults.restrict_to_workspace", true},
|
{"agents", "defaults.restrict_to_workspace", true},
|
||||||
{"heartbeat", "enabled", true},
|
{"heartbeat", "enabled", true},
|
||||||
|
|
@ -2332,7 +2332,6 @@ func TestBuildSchema_GatewaySectionExcluded(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// --- #34: goTypeToSchema unknown type ---
|
// --- #34: goTypeToSchema unknown type ---
|
||||||
|
|
||||||
func TestGoTypeToSchema_UnknownType(t *testing.T) {
|
func TestGoTypeToSchema_UnknownType(t *testing.T) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue