fieldalignment of all structs to save memory
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
@@ -77,7 +77,7 @@ func (t template) Compile() Template {
|
||||
rawOps = append(rawOps, s.compile()...)
|
||||
}
|
||||
|
||||
//ops := make([]int, 0, len(rawOps))
|
||||
// ops := make([]int, 0, len(rawOps))
|
||||
var (
|
||||
ops []int
|
||||
pool []string
|
||||
|
@@ -50,9 +50,7 @@ func tokenize(path string) (tokens []string, verb string) {
|
||||
field
|
||||
nested
|
||||
)
|
||||
var (
|
||||
st = init
|
||||
)
|
||||
st := init
|
||||
for path != "" {
|
||||
var idx int
|
||||
switch st {
|
||||
|
@@ -209,7 +209,8 @@ func TestParseSegments(t *testing.T) {
|
||||
"a", "/", "b", "/", "*", "/", "c",
|
||||
"}", "/",
|
||||
"**",
|
||||
eof},
|
||||
eof,
|
||||
},
|
||||
want: []segment{
|
||||
literal("v1"),
|
||||
variable{
|
||||
|
Reference in New Issue
Block a user