Touchups in job.go

This commit is contained in:
InsanePrawn 2018-11-21 03:27:39 +01:00
parent 7de3c0a09a
commit dd11fc96db

View File

@ -39,7 +39,7 @@ type Type string
const (
TypeInternal Type = "internal"
TypeSnap = "snap"
TypeSnap Type = "snap"
TypePush Type = "push"
TypeSink Type = "sink"
TypePull Type = "pull"
@ -86,7 +86,9 @@ func (s *Status) UnmarshalJSON(in []byte) (err error) {
}
switch s.Type {
case TypeSnap:
fallthrough
var st SnapJobStatus
err = json.Unmarshal(jobJSON, &st)
s.JobSpecific = &st
case TypePull: fallthrough
case TypePush:
var st ActiveSideStatus