mirror of https://github.com/kubernetes/kops.git
modifying generator to create SetLifecycle
This commit is contained in:
parent
c87b8ee8ee
commit
a68cf85aba
|
@ -30,7 +30,7 @@ type FitaskGenerator struct {
|
||||||
var _ codegen.Generator = &FitaskGenerator{}
|
var _ codegen.Generator = &FitaskGenerator{}
|
||||||
|
|
||||||
const fileHeaderDef = `/*
|
const fileHeaderDef = `/*
|
||||||
Copyright 2016 The Kubernetes Authors.
|
Copyright 2018 The Kubernetes Authors.
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with 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
|
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}}{}
|
var _ fi.HasName = &{{.Name}}{}
|
||||||
|
|
||||||
// GetName returns the Name of the object, implementing fi.HasName
|
// GetName returns the Name of the object, implementing fi.HasName
|
||||||
|
|
Loading…
Reference in New Issue