12 lines
194 B
Go
12 lines
194 B
Go
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
|
|
}
|