fix lint issues (#16)

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-02-13 01:46:16 +03:00
committed by GitHub
parent fd5ed64729
commit abb9937787
19 changed files with 108 additions and 79 deletions

View File

@@ -62,7 +62,7 @@ func (l literal) compile() []op {
}
func (v variable) compile() []op {
var ops []op
ops := make([]op, 0, len(v.segments))
for _, s := range v.segments {
ops = append(ops, s.compile()...)
}
@@ -78,11 +78,12 @@ func (v variable) compile() []op {
}
func (t template) Compile() Template {
var rawOps []op
rawOps := make([]op, 0, len(t.segments))
for _, s := range t.segments {
rawOps = append(rawOps, s.compile()...)
}
//ops := make([]int, 0, len(rawOps))
var (
ops []int
pool []string