Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions _generated/limits.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//msgp:limit arrays:100 maps:50

package _generated

//go:generate msgp

// Test structures for limit directive
type LimitedData struct {
SmallArray [10]int `msg:"small_array"`
LargeSlice []byte `msg:"large_slice"`
SmallMap map[string]int `msg:"small_map"`
}

type UnlimitedData struct {
BigArray [1000]int `msg:"big_array"`
BigSlice []string `msg:"big_slice"`
BigMap map[string][]int `msg:"big_map"`
}

type LimitTestData struct {
SmallArray [10]int `msg:"small_array"`
LargeSlice []byte `msg:"large_slice"`
SmallMap map[string]int `msg:"small_map"`
}
10 changes: 10 additions & 0 deletions _generated/limits2.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package _generated

//go:generate msgp

//msgp:limit arrays:200 maps:100

type LimitTestData2 struct {
BigArray [20]int `msg:"big_array"`
BigMap map[string]int `msg:"big_map"`
}
Loading
Loading