You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Needs to separate map k:v pairs with commas - ',' - use case below w/o codecgen output. To complete "go test" case run "codecgen -o codecdemo_codec.go codecdemo.go" first.
Needs to separate map k:v pairs with commas - ',' - use case below w/o codecgen output. To complete "go test" case run "codecgen -o codecdemo_codec.go codecdemo.go" first.
codecdemo.go:
package codecdemo
import (
"github.com/ugorji/go/codec"
"strconv"
"time"
)
type MapVal struct {
Name string
Time time.Time
}
type Entry struct {
Vals map[string]*MapVal
}
type Wrapper struct {
Entries []*Entry
}
func Codecdemo() ([]byte, error) {
w := new(Wrapper)
w.Entries = make([]_Entry, 1)
e := new(Entry)
w.Entries[0] = e
w.Entries[0].Vals = make(map[string]_MapVal, 0)
}
codecdemo_test.go:
import (
"encoding/json"
"testing"
)
func TestCodecDemo(t *testing.T) {
val, err := Codecdemo()
if err != nil {
t.Fatal(err)
}
}
The text was updated successfully, but these errors were encountered: