Compose native application commands and shared configuration scopes
This commit is contained in:
38
internal/cli/application.go
Normal file
38
internal/cli/application.go
Normal file
@@ -0,0 +1,38 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"gitea.maximumdirect.net/eric/notarius/internal/core/config"
|
||||
"go.maximumdirect.net/ckconfig"
|
||||
"go.maximumdirect.net/commandkit"
|
||||
"go.maximumdirect.net/configkit"
|
||||
)
|
||||
|
||||
// NewApplication declares the native command surface. Acquisition is deferred to
|
||||
// the selected handler; construction performs no configuration or engine work.
|
||||
func NewApplication(version string, options Options) (*commandkit.App, error) {
|
||||
newState := func() *nativeLoaders { return &nativeLoaders{lookupEnv: options.LookupEnv} }
|
||||
load := func(ctx context.Context, selection ckconfig.Selection, _ struct{}, state *nativeLoaders) (*configkit.Result[config.Document], error) {
|
||||
return state.application(ctx, selection)
|
||||
}
|
||||
appScope := ckconfig.FromConfigKit("app", "Notarius application configuration.", load)
|
||||
appScope.Features.Overrides = true
|
||||
promptScope := ckconfig.FromConfigKitSubtree("promptkit", "Native PromptKit configuration.", configkit.Keys("promptkit"), load)
|
||||
promptScope.Features.Overrides = true
|
||||
return commandkit.New(commandkit.Identity{Name: "notarius", Version: version},
|
||||
commandkit.Completion("notarius"),
|
||||
ckconfig.Command(ckconfig.Suite[struct{}, *nativeLoaders]{
|
||||
NewState: newState,
|
||||
CheckInput: func(_ string, selection ckconfig.Selection, _ struct{}) error {
|
||||
if selection.Config.Set && strings.TrimSpace(selection.Config.Value) == "" {
|
||||
return fmt.Errorf("--config must not be empty")
|
||||
}
|
||||
return nil
|
||||
},
|
||||
Scopes: []ckconfig.Scope[struct{}, *nativeLoaders]{appScope, promptScope},
|
||||
}),
|
||||
)
|
||||
}
|
||||
76
internal/cli/application_test.go
Normal file
76
internal/cli/application_test.go
Normal file
@@ -0,0 +1,76 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"context"
|
||||
"encoding/json"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"go.maximumdirect.net/commandkit"
|
||||
)
|
||||
|
||||
func TestNativeApplicationBuiltinsNeedNoConfiguration(t *testing.T) {
|
||||
t.Parallel()
|
||||
app, err := NewApplication("v1.2.3", Options{LookupEnv: func(string) (string, bool) { t.Fatal("builtin attempted configuration discovery"); return "", false }})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for _, args := range [][]string{{"--help"}, {"help"}, {"version"}, {"completion", "bash"}, {"completion", "zsh"}, {"completion", "fish"}, {"config", "--help"}} {
|
||||
var out, diagnostics bytes.Buffer
|
||||
outcome := app.Execute(context.Background(), args, commandkit.Streams{Out: &out, Err: &diagnostics})
|
||||
if outcome.Status != 0 || out.Len() == 0 {
|
||||
t.Fatalf("%v: %#v, %s", args, outcome, diagnostics.String())
|
||||
}
|
||||
if args[0] == "version" && !strings.Contains(out.String(), "v1.2.3") {
|
||||
t.Fatalf("release identity missing: %s", out.String())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestNativeConfigurationScopesAndDiffUseSelectedLoadEvidence(t *testing.T) {
|
||||
t.Parallel()
|
||||
dir := t.TempDir()
|
||||
left, right := filepath.Join(dir, "left.yml"), filepath.Join(dir, "right.yml")
|
||||
writeConfigKitFile(t, left, "version: 6\nconcurrency: {workers: 1}\n")
|
||||
writeConfigKitFile(t, right, "version: 6\nconcurrency: {workers: 3}\n")
|
||||
app, err := NewApplication("development", Options{})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for _, test := range []struct {
|
||||
name string
|
||||
args []string
|
||||
status int
|
||||
fragment string
|
||||
}{
|
||||
{"application explanation", []string{"config", "explain", "--path", "/concurrency/workers", "--config", left}, 0, "workers"},
|
||||
{"focused settings", []string{"config", "show", "--scope", "promptkit", "--config", left, "--format", "json"}, 0, "notarius"},
|
||||
{"sources", []string{"config", "sources", "--config", left}, 0, "left.yml"},
|
||||
{"validation", []string{"config", "validate", "--scope", "all", "--config", left}, 0, ""},
|
||||
{"differences", []string{"config", "diff", "--config", left, "--against-config", right, "--check"}, 3, "workers"},
|
||||
{"identical", []string{"config", "diff", "--config", left, "--against-config", left, "--check"}, 0, ""},
|
||||
{"empty", []string{"config", "show", "--config", ""}, 2, ""},
|
||||
} {
|
||||
t.Run(test.name, func(t *testing.T) {
|
||||
var out, diagnostics bytes.Buffer
|
||||
outcome := app.Execute(context.Background(), test.args, commandkit.Streams{Out: &out, Err: &diagnostics})
|
||||
if outcome.Status != test.status {
|
||||
t.Fatalf("outcome = %#v, output %s, diagnostics %s", outcome, out.String(), diagnostics.String())
|
||||
}
|
||||
if test.fragment != "" && !strings.Contains(out.String(), test.fragment) {
|
||||
t.Fatalf("missing %q: %s", test.fragment, out.String())
|
||||
}
|
||||
if test.name == "focused settings" {
|
||||
var report map[string]any
|
||||
if err := json.Unmarshal(out.Bytes(), &report); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, found := report["pipelines"]; found {
|
||||
t.Fatal("focused PromptKit report exposed application-root value")
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -1,259 +0,0 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"flag"
|
||||
"fmt"
|
||||
"io"
|
||||
"strings"
|
||||
|
||||
"gitea.maximumdirect.net/eric/notarius/internal/core/config"
|
||||
frameworkllm "gitea.maximumdirect.net/eric/notarius/internal/framework/llm"
|
||||
configkit "go.maximumdirect.net/configkit"
|
||||
)
|
||||
|
||||
func runConfigEffective(args []string, stdout, stderr io.Writer, opts Options) int {
|
||||
fs := flag.NewFlagSet("config effective", flag.ContinueOnError)
|
||||
fs.SetOutput(io.Discard)
|
||||
configPath := fs.String("config", "", "config file path")
|
||||
overlay := fs.String("config-overlay", "", "configuration overlay")
|
||||
scope := fs.String("scope", "notarius", "configuration scope: notarius or promptkit")
|
||||
if err := fs.Parse(args); err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: %v\n", err)
|
||||
return 2
|
||||
}
|
||||
if fs.NArg() != 0 {
|
||||
fmt.Fprintf(stderr, "notarius: unexpected argument %q\n", fs.Arg(0))
|
||||
return 2
|
||||
}
|
||||
if *scope != "notarius" && *scope != "promptkit" {
|
||||
fmt.Fprintf(stderr, "notarius: invalid configuration scope %q (want notarius or promptkit)\n", *scope)
|
||||
return 2
|
||||
}
|
||||
loaded, _, err := loadConfigKit(*configPath, *overlay, nil, opts)
|
||||
if err != nil {
|
||||
writeConfigLoadError(stderr, err)
|
||||
return 1
|
||||
}
|
||||
if *scope == "notarius" {
|
||||
if err := loaded.WriteEffective(stdout); err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: write effective configuration: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
inspector, err := newPromptKitInspection(loaded.Config, opts)
|
||||
if err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: inspect PromptKit configuration: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
if err := inspector.WriteEffectiveConfiguration(stdout); err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: write effective configuration: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func runConfigExplain(args []string, stdout, stderr io.Writer, opts Options) int {
|
||||
fs := flag.NewFlagSet("config explain", flag.ContinueOnError)
|
||||
fs.SetOutput(io.Discard)
|
||||
configPath := fs.String("config", "", "config file path")
|
||||
overlay := fs.String("config-overlay", "", "configuration overlay")
|
||||
scope := fs.String("scope", "notarius", "configuration scope: notarius or promptkit")
|
||||
if err := fs.Parse(args); err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: %v\n", err)
|
||||
return 2
|
||||
}
|
||||
if fs.NArg() != 1 {
|
||||
fmt.Fprintln(stderr, "notarius: config explain requires exactly one JSON Pointer")
|
||||
return 2
|
||||
}
|
||||
if *scope != "notarius" && *scope != "promptkit" {
|
||||
fmt.Fprintf(stderr, "notarius: invalid configuration scope %q (want notarius or promptkit)\n", *scope)
|
||||
return 2
|
||||
}
|
||||
pointer := fs.Arg(0)
|
||||
parsed, err := configkit.ParsePath(pointer)
|
||||
if err != nil || parsed.String() != pointer {
|
||||
fmt.Fprintf(stderr, "notarius: %q is not a canonical JSON Pointer\n", pointer)
|
||||
return 2
|
||||
}
|
||||
if *scope == "promptkit" {
|
||||
loaded, _, err := loadConfigKit(*configPath, *overlay, nil, opts)
|
||||
if err != nil {
|
||||
writeConfigLoadError(stderr, err)
|
||||
return 1
|
||||
}
|
||||
inspector, err := newPromptKitInspection(loaded.Config, opts)
|
||||
if err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: inspect PromptKit configuration: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
found, err := inspector.WriteConfigurationExplanation(stdout, pointer)
|
||||
if err != nil {
|
||||
if errors.Is(err, frameworkllm.ErrInvalidPromptKitConfigurationPointer) {
|
||||
fmt.Fprintf(stderr, "notarius: %q is not a canonical JSON Pointer\n", pointer)
|
||||
return 2
|
||||
}
|
||||
fmt.Fprintf(stderr, "notarius: write PromptKit configuration explanation: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
if !found {
|
||||
fmt.Fprintf(stderr, "notarius: PromptKit configuration pointer %q is unknown\n", pointer)
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
loaded, _, err := loadConfigKit(*configPath, *overlay, nil, opts)
|
||||
if err != nil {
|
||||
writeConfigLoadError(stderr, err)
|
||||
return 1
|
||||
}
|
||||
if err := loaded.WriteExplanation(stdout, pointer); err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: write configuration explanation: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func runConfigProfile(args []string, stdout, stderr io.Writer, opts Options) int {
|
||||
fs := flag.NewFlagSet("config profile", flag.ContinueOnError)
|
||||
fs.SetOutput(io.Discard)
|
||||
configPath := fs.String("config", "", "config file path")
|
||||
overlay := fs.String("config-overlay", "", "configuration overlay")
|
||||
if err := fs.Parse(args); err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: %v\n", err)
|
||||
return 2
|
||||
}
|
||||
if fs.NArg() != 1 || strings.TrimSpace(fs.Arg(0)) == "" {
|
||||
fmt.Fprintln(stderr, "notarius: config profile requires exactly one nonblank profile ID")
|
||||
return 2
|
||||
}
|
||||
profileID := fs.Arg(0)
|
||||
loaded, _, err := loadConfigKit(*configPath, *overlay, nil, opts)
|
||||
if err != nil {
|
||||
writeConfigLoadError(stderr, err)
|
||||
return 1
|
||||
}
|
||||
inspector, err := newPromptKitInspection(loaded.Config, opts)
|
||||
if err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: inspect PromptKit configuration: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
profile, err := inspector.InspectProfile(context.Background(), profileID)
|
||||
if err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
result := struct {
|
||||
ProfileID string `json:"profile_id"`
|
||||
APIKeyRequired bool `json:"api_key_required"`
|
||||
EffectiveModelParams frameworkllm.PromptKitEffectiveModelParams `json:"effective_model_params"`
|
||||
}{
|
||||
ProfileID: profile.ProfileID,
|
||||
APIKeyRequired: profile.CredentialRequired,
|
||||
EffectiveModelParams: profile.EffectiveModelParams,
|
||||
}
|
||||
if err := json.NewEncoder(stdout).Encode(result); err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: write PromptKit profile inspection: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func newPromptKitInspection(cfg config.Config, opts Options) (*frameworkllm.PromptKitProfileInspector, error) {
|
||||
return frameworkllm.NewPromptKitProfileInspector(frameworkllm.PromptKitProfileInspectorConfig{
|
||||
Source: promptKitProfileSourceConfig(cfg),
|
||||
Assets: opts.promptKitAssets,
|
||||
})
|
||||
}
|
||||
|
||||
func runConfigValidate(args []string, stdout, stderr io.Writer, opts Options) int {
|
||||
fs := flag.NewFlagSet("config validate", flag.ContinueOnError)
|
||||
fs.SetOutput(io.Discard)
|
||||
configPath := fs.String("config", "", "config file path")
|
||||
overlay := fs.String("config-overlay", "", "configuration overlay")
|
||||
pipelineID := fs.String("pipeline", "", "pipeline ID")
|
||||
onlyRaw := fs.String("only", "", "comma-separated artifact lanes")
|
||||
if err := fs.Parse(args); err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: %v\n", err)
|
||||
return 2
|
||||
}
|
||||
if fs.NArg() != 0 {
|
||||
fmt.Fprintf(stderr, "notarius: unexpected argument %q\n", fs.Arg(0))
|
||||
return 2
|
||||
}
|
||||
if strings.TrimSpace(*onlyRaw) != "" && strings.TrimSpace(*pipelineID) == "" {
|
||||
fmt.Fprintln(stderr, "notarius: --only requires --pipeline")
|
||||
return 2
|
||||
}
|
||||
only, err := parseOnly(*onlyRaw)
|
||||
if err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: %v\n", err)
|
||||
return 2
|
||||
}
|
||||
loaded, path, err := loadConfigKit(*configPath, *overlay, nil, opts)
|
||||
if err != nil {
|
||||
writeConfigLoadError(stderr, err)
|
||||
return 1
|
||||
}
|
||||
if strings.TrimSpace(*pipelineID) == "" {
|
||||
fmt.Fprintf(stdout, "config %q is valid\n", path)
|
||||
return 0
|
||||
}
|
||||
catalog, err := effectiveCatalog(opts)
|
||||
if err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
effective, err := loaded.Config.Resolve(config.ResolveInput{PipelineID: *pipelineID, Only: only, Catalog: catalog})
|
||||
if err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
if err := validateExplicitPromptKitProfiles(context.Background(), effective.Config, effectiveLLMProfileIDs(effective.ResolvedPipeline), opts.promptKitAssets); err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
fmt.Fprintf(stdout, "config %q is valid for pipeline %q\n", path, strings.TrimSpace(*pipelineID))
|
||||
return 0
|
||||
}
|
||||
|
||||
func runPipelinesList(args []string, stdout, stderr io.Writer, opts Options) int {
|
||||
fs := flag.NewFlagSet("pipelines list", flag.ContinueOnError)
|
||||
fs.SetOutput(io.Discard)
|
||||
configPath := fs.String("config", "", "config file path")
|
||||
overlay := fs.String("config-overlay", "", "configuration overlay")
|
||||
jsonOutput := fs.Bool("json", false, "write JSON output")
|
||||
if err := fs.Parse(args); err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: %v\n", err)
|
||||
return 2
|
||||
}
|
||||
if fs.NArg() != 0 {
|
||||
fmt.Fprintf(stderr, "notarius: unexpected argument %q\n", fs.Arg(0))
|
||||
return 2
|
||||
}
|
||||
loaded, _, err := loadConfigKit(*configPath, *overlay, nil, opts)
|
||||
if err != nil {
|
||||
writeConfigLoadError(stderr, err)
|
||||
return 1
|
||||
}
|
||||
ids := sortedPipelineIDs(loaded.Config)
|
||||
if *jsonOutput {
|
||||
payload, err := json.Marshal(struct {
|
||||
Pipelines []string `json:"pipelines"`
|
||||
}{Pipelines: ids})
|
||||
if err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: marshal pipeline list: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
fmt.Fprintf(stdout, "%s\n", payload)
|
||||
return 0
|
||||
}
|
||||
for _, id := range ids {
|
||||
fmt.Fprintln(stdout, id)
|
||||
}
|
||||
return 0
|
||||
}
|
||||
@@ -26,20 +26,10 @@ import (
|
||||
frameworkdebug "gitea.maximumdirect.net/eric/notarius/internal/framework/debug"
|
||||
frameworkllm "gitea.maximumdirect.net/eric/notarius/internal/framework/llm"
|
||||
"gitea.maximumdirect.net/eric/notarius/internal/framework/pipeline"
|
||||
"go.maximumdirect.net/commandkit"
|
||||
configkit "go.maximumdirect.net/configkit"
|
||||
)
|
||||
|
||||
const usage = `Usage:
|
||||
notarius help
|
||||
notarius --version
|
||||
notarius run <pipeline-id> --input path/to/source.json [--json] [flags]
|
||||
notarius config validate --config path/to/config.yml [--config-overlay name] [--pipeline pipeline-id] [--only lane-a,lane-b]
|
||||
notarius config effective [--scope notarius|promptkit] --config path/to/config.yml [--config-overlay name]
|
||||
notarius config explain [--scope notarius|promptkit] --config path/to/config.yml [--config-overlay name] <json-pointer>
|
||||
notarius config profile [--config path/to/config.yml] [--config-overlay name] <profile-id>
|
||||
notarius pipelines list --config path/to/config.yml [--config-overlay name] [--json]
|
||||
`
|
||||
|
||||
type Options struct {
|
||||
Catalog pipeline.ModuleCatalog
|
||||
Registries pipeline.Registries
|
||||
@@ -66,50 +56,17 @@ func Run(args []string, stdout, stderr io.Writer) int {
|
||||
}
|
||||
|
||||
func RunWithOptions(args []string, stdout, stderr io.Writer, opts Options) int {
|
||||
if len(args) > 0 && args[0] == "--version" {
|
||||
if len(args) != 1 {
|
||||
fmt.Fprintln(stderr, "notarius: --version does not accept arguments")
|
||||
return 2
|
||||
}
|
||||
version, err := buildinfo.Version()
|
||||
if err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
fmt.Fprintf(stdout, "notarius %s\n", version)
|
||||
return 0
|
||||
}
|
||||
|
||||
var err error
|
||||
opts, err = normalizeOptions(opts)
|
||||
version, err := buildinfo.Version()
|
||||
if err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
if len(args) == 0 {
|
||||
writeUsage(stdout)
|
||||
return 0
|
||||
app, err := NewApplication(version, opts)
|
||||
if err != nil {
|
||||
fmt.Fprintf(stderr, "notarius: %v\n", err)
|
||||
return 1
|
||||
}
|
||||
|
||||
switch args[0] {
|
||||
case "help", "--help", "-h":
|
||||
writeUsage(stdout)
|
||||
return 0
|
||||
case "config":
|
||||
return runConfig(args[1:], stdout, stderr, opts)
|
||||
case "pipelines":
|
||||
return runPipelines(args[1:], stdout, stderr, opts)
|
||||
case "run":
|
||||
return runPipelineCommand(args[1:], stdout, stderr, opts)
|
||||
default:
|
||||
fmt.Fprintf(stderr, "notarius: unknown command %q\n", args[0])
|
||||
writeUsage(stderr)
|
||||
return 2
|
||||
}
|
||||
}
|
||||
|
||||
func writeUsage(w io.Writer) {
|
||||
fmt.Fprint(w, usage)
|
||||
return app.Execute(context.Background(), args, commandkit.Streams{Out: stdout, Err: stderr}).Status
|
||||
}
|
||||
|
||||
func normalizeOptions(opts Options) (Options, error) {
|
||||
@@ -1046,44 +1003,6 @@ func runMetadata(outputDir, debugDir string) map[string]any {
|
||||
return metadata
|
||||
}
|
||||
|
||||
func runConfig(args []string, stdout, stderr io.Writer, opts Options) int {
|
||||
if len(args) == 0 {
|
||||
fmt.Fprintln(stderr, "notarius: config requires a subcommand")
|
||||
writeUsage(stderr)
|
||||
return 2
|
||||
}
|
||||
switch args[0] {
|
||||
case "validate":
|
||||
return runConfigValidate(args[1:], stdout, stderr, opts)
|
||||
case "effective":
|
||||
return runConfigEffective(args[1:], stdout, stderr, opts)
|
||||
case "explain":
|
||||
return runConfigExplain(args[1:], stdout, stderr, opts)
|
||||
case "profile":
|
||||
return runConfigProfile(args[1:], stdout, stderr, opts)
|
||||
default:
|
||||
fmt.Fprintf(stderr, "notarius: unknown config subcommand %q\n", args[0])
|
||||
writeUsage(stderr)
|
||||
return 2
|
||||
}
|
||||
}
|
||||
|
||||
func runPipelines(args []string, stdout, stderr io.Writer, opts Options) int {
|
||||
if len(args) == 0 {
|
||||
fmt.Fprintln(stderr, "notarius: pipelines requires a subcommand")
|
||||
writeUsage(stderr)
|
||||
return 2
|
||||
}
|
||||
switch args[0] {
|
||||
case "list":
|
||||
return runPipelinesList(args[1:], stdout, stderr, opts)
|
||||
default:
|
||||
fmt.Fprintf(stderr, "notarius: unknown pipelines subcommand %q\n", args[0])
|
||||
writeUsage(stderr)
|
||||
return 2
|
||||
}
|
||||
}
|
||||
|
||||
func parseOnly(raw string) ([]string, error) {
|
||||
if strings.TrimSpace(raw) == "" {
|
||||
return nil, nil
|
||||
|
||||
Reference in New Issue
Block a user