Skip to content

Instantly share code, notes, and snippets.

@ImJasonH ImJasonH/main.go
Created Dec 17, 2019

What would you like to do?
Example of parsing a YAML file into a Tekton Task
import (
var (
filename = flag.String("f", "", "Name of file to parse")
func main() {
b, err := ioutil.ReadFile(*filename)
if err != nil {
var task v1alpha1.Task
scheme.Codecs.UniversalDeserializer().Decode(b, nil, &task); err != nil {
log.Printf("Task: %+v", task)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.