chore(go): audit shared plugin helpers
Drop unused expandHome and standardizeJSONC, share the runtime base URL validator between the guard and audit templates, and trim comments. Claude-Session: https://claude.ai/code/session_01Agoc9bRVE9KL7mmWtey9Vq
This commit is contained in:
1 parent
5e08ab20f5
commit
b085947547
9 files changed
+42
-102
No files matched your search
@@ -17,15 +17,6 @@ type jsoncEditor struct {
|
||||
label string
|
||||
}
|
||||
|
||||
func standardizeJSONC(source []byte, label string, allowTrailingCommas bool) ([]byte, error) {
|
||||
value, err := parseJSONC(source, label, allowTrailingCommas)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
value.Standardize()
|
||||
return value.Pack(), nil
|
||||
}
|
||||
|
||||
func parseJSONC(source []byte, label string, allowTrailingCommas bool) (hujson.Value, error) {
|
||||
value, err := hujson.Parse(source)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user