modifying generator to create SetLifecycle

This commit is contained in:
chrislovecnm 2018-02-14 16:10:19 -07:00
parent c87b8ee8ee
commit a68cf85aba
1 changed files with 6 additions and 1 deletions

View File

@ -30,7 +30,7 @@ type FitaskGenerator struct {
var _ codegen.Generator = &FitaskGenerator{}
const fileHeaderDef = `/*
Copyright 2016 The Kubernetes Authors.
Copyright 2018 The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -86,6 +86,11 @@ func (o *{{.Name}}) GetLifecycle() *fi.Lifecycle {
return o.Lifecycle
}
// SetLifecycle sets the Lifecycle of the object, implementing fi.SetLifecycle
func (o *{{.Name}}) SetLifecycle(lifecycle fi.Lifecycle) {
o.Lifecycle = &lifecycle
}
var _ fi.HasName = &{{.Name}}{}
// GetName returns the Name of the object, implementing fi.HasName