From 48f4db09aa9cc6a7bd832a396d67d6205caa6cbd Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Wed, 18 Nov 2015 15:26:38 -0800 Subject: [PATCH] Register gob type and remove slicetype --- command/run.go | 1 + nomad/structs/structs.go | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/command/run.go b/command/run.go index 0ec0212e8..5b674b81b 100644 --- a/command/run.go +++ b/command/run.go @@ -124,6 +124,7 @@ func (c *RunCommand) Run(args []string) int { // This function is just a hammer and probably needs to be revisited. func convertJob(in *structs.Job) (*api.Job, error) { gob.Register([]map[string]interface{}{}) + gob.Register([]interface{}{}) var apiJob *api.Job buf := new(bytes.Buffer) if err := gob.NewEncoder(buf).Encode(in); err != nil { diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index 876bb0c39..a601fde29 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -1711,7 +1711,6 @@ var MsgpackHandle = func() *codec.MsgpackHandle { // This is necessary in particular because we store the driver configs as a // nil interface{}. h.MapType = reflect.TypeOf(map[string]interface{}(nil)) - h.SliceType = reflect.TypeOf([]string{}) return h }()