{"record":{"id":"396078769de11c76","repo":"getsops/sops","slug":"the-dotenv-store-only-supports-emitting-strings-g","errorCode":null,"errorMessage":"the dotenv store only supports emitting strings, got %T","messagePattern":"the dotenv store only supports emitting strings, got %T","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"stores/dotenv/store.go","lineNumber":118,"sourceCode":"\t\t\tif !ok {\n\t\t\t\tvalue = stores.ValToString(item.Value)\n\t\t\t} else {\n\t\t\t\tvalue = strings.ReplaceAll(value, \"\\n\", \"\\\\n\")\n\t\t\t}\n\n\t\t\tline = fmt.Sprintf(\"%s=%s\\n\", item.Key, value)\n\t\t}\n\t\tbuffer.WriteString(line)\n\t}\n\treturn buffer.Bytes(), nil\n}\n\n// EmitValue returns a single value as bytes\nfunc (Store) EmitValue(v interface{}) ([]byte, error) {\n\tif s, ok := v.(string); ok {\n\t\treturn []byte(s), nil\n\t}\n\treturn nil, fmt.Errorf(\"the dotenv store only supports emitting strings, got %T\", v)\n}\n\n// EmitExample returns the bytes corresponding to an example Flat Tree runtime object\nfunc (store *Store) EmitExample() []byte {\n\tbytes, err := store.EmitPlainFile(stores.ExampleFlatTree.Branches)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\treturn bytes\n}\n\n// Deprecated: use stores.IsComplexValue() instead!\nfunc IsComplexValue(v interface{}) bool {\n\treturn stores.IsComplexValue(v)\n}\n\n// HasSopsTopLevelKey checks whether a top-level \"sops\" key exists.\nfunc (store *Store) HasSopsTopLevelKey(branch sops.TreeBranch) bool {","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/getsops/sops/blob/13442bb98183887d7a9ac09ec8ab0564673a59d8/stores/dotenv/store.go#L100-L136","documentation":"Error \"the dotenv store only supports emitting strings, got %T\" thrown in getsops/sops.","triggerScenarios":"Thrown at stores/dotenv/store.go:118 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"13442bb98183887d7a9ac09ec8ab0564673a59d8","analyzedAt":"2026-09-01T03:53:00.447Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}