Skip to content

Commit

Permalink
Fixing all errors, linting
Browse files Browse the repository at this point in the history
  • Loading branch information
lovestaco committed Jul 20, 2023
1 parent 2b505fc commit 312d5bd
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
3 changes: 2 additions & 1 deletion parser/jsonparser.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ func (p *Lama2Parser) PrimitiveType() (*gabs.Container, error) {

// CustomPairMerge uses a gabs feature to deal with merge conflicts.
// More here: https://github.com/HexmosTech/gabs/blob/master/gabs.go#L511
func CustomPairMerge(_, source interface{}) interface{} {
//nolint:all
func CustomPairMerge(destination, source interface{}) interface{} {
return source
}

Expand Down
1 change: 1 addition & 0 deletions preprocess/expandvar.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func Expand(s string, vm *goja.Runtime, mapping map[string]string) string {
}
buf = append(buf, s[i:j]...)
name, w := getShellName(s[j+1:])
//nolint:all
if name == "" && w > 0 {
// Encountered invalid syntax; eat the
// characters.
Expand Down
2 changes: 1 addition & 1 deletion preprocess/preprocess.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func debugOp(str string) {
func escapeString(input string) string {
output, err := json.Marshal(input)
if err != nil {
// handle error
log.Error().Str("Error marshaling JSON:","escapeString()")
}
return string(output)
}
Expand Down
3 changes: 0 additions & 3 deletions tests/lama2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ func PerformParserMatch(text string) (*gabs.Container, error) {
got, e := p.Parse(text)
if e == nil {
log.Debug().Str("Got", got.String()).Msg("")
} else {
// t.Errorf("Error not expected")
// fmt.Println(e)
}
return got, e
}
Expand Down

0 comments on commit 312d5bd

Please sign in to comment.