rpi-vsts-ci-led/pkg/cihook/cihook.go

12 lines
194 B
Go
Raw Normal View History

2020-04-17 08:41:48 +00:00
package cihook
import "encoding/json"
func Parse(b []byte) (*PipelineEvent, error) {
p := &PipelineEvent{}
if err := json.Unmarshal(b, p); err != nil {
return nil, err
}
return p, nil
}