Skip to content

Commit

Permalink
fix go linter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hay-kot committed Nov 24, 2022
1 parent b933448 commit 11e5df2
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 86 deletions.
6 changes: 0 additions & 6 deletions flint/builtins/builtins.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,3 @@ func New(id, level, desc string) BuiltIns {
Description: desc,
}
}

func (b BuiltIns) Reset(id, level, desc string) {
b.ID = id
b.Level = level
b.Description = desc
}
6 changes: 1 addition & 5 deletions flint/builtins/required.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,12 @@ func (b BuiltIns) Required(fm frontmatter.FrontMatter, keys *set.Set[string]) er
missing := fmKeys.Missing(keys)

if missing.Len() > 0 {
var errors []string
for _, key := range missing.Slice() {
errors = append(errors, key)
}

return ErrorKeysRequired{
ID: b.ID,
Level: b.Level,
Description: b.Description,
Fields: errors,
Fields: missing.Slice(),
}
}

Expand Down
5 changes: 5 additions & 0 deletions pkgs/frontmatter/frontmatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ var (
ErrNoFrontMatter = errors.New("no front matter found")
)

var (
YAMLSeparator = []byte("---")
NewLine = []byte("\n")
)

type FrontMatter struct {
content []byte
data map[string]interface{}
Expand Down
File renamed without changes.
75 changes: 0 additions & 75 deletions pkgs/frontmatter/parse.go

This file was deleted.

0 comments on commit 11e5df2

Please sign in to comment.