store.go
Function RenderJSON
has 6 return statements (exceeds 4 allowed). Open
Open
func RenderJSON(c *RuntimeConfig) (string, error) {
var err error
debug = c.Debug
currentTemplateFilter, err = NewTemplateFilter(c.Vars, c.VarsInline)
if err != nil {
Function mergeJSONData
has 6 return statements (exceeds 4 allowed). Open
Open
func mergeJSONData(gossConfig GossConfig, depth int, path string) (GossConfig, error) {
depth++
if depth >= 50 {
return GossConfig{}, fmt.Errorf("max depth of 50 reached, possibly due to dependency loop in goss file")
}
Function varsFromFile
has 5 return statements (exceeds 4 allowed). Open
Open
func varsFromFile(varsFile string) (map[string]interface{}, error) {
vars := make(map[string]interface{})
if varsFile == "" {
return vars, nil
}
Function WriteJSON
has 5 return statements (exceeds 4 allowed). Open
Open
func WriteJSON(filePath string, gossConfig GossConfig) error {
jsonData, err := marshal(gossConfig)
if err != nil {
return fmt.Errorf("failed to write %s: %s", filePath, err)
}
exported type TmplVars should have comment or be unexported Open
Open
type TmplVars struct {
- Exclude checks
exported method TmplVars.Env should have comment or be unexported Open
Open
func (t *TmplVars) Env() map[string]string {
- Exclude checks
exported function WriteJSON should have comment or be unexported Open
Open
func WriteJSON(filePath string, gossConfig GossConfig) error {
- Exclude checks
exported const UNSET should have comment (or a comment on this block) or be unexported Open
Open
UNSET = iota
- Exclude checks
comment on exported function RenderJSON should be of the form "RenderJSON ..." Open
Open
// Reads json file recursively returning string
- Exclude checks