返回 DeepSeek-Reasonix
render_plugin.go
根目录 / internal / config / render_plugin.go
1 package config
2
3 import (
4 "fmt"
5 "strings"
6 )
7
8 // renderPluginPolicy writes the per-server policy fields both render scopes
9 // share. They live together so a policy added to one scope cannot be forgotten
10 // in the other, which would silently drop a user's setting on the next save.
11 func renderPluginPolicy(b *strings.Builder, pl PluginEntry) {
12 if c := strings.TrimSpace(pl.Concurrency); c != "" {
13 fmt.Fprintf(b, "concurrency = %q\n", c)
14 }
15 if pl.AutoStart != nil {
16 fmt.Fprintf(b, "auto_start = %v\n", *pl.AutoStart)
17 }
18 }
19
19 lines GO