Improve error message when name is omitted but generateName is available

This commit is contained in:
derekwaynecarr
2015-04-14 18:03:26 -04:00
parent 4d3b66c09f
commit 81dcd8c836
17 changed files with 184 additions and 81 deletions

View File

@@ -21,14 +21,16 @@ import (
)
type attributesRecord struct {
kind string
namespace string
resource string
operation string
object runtime.Object
}
func NewAttributesRecord(object runtime.Object, namespace, resource, operation string) Attributes {
func NewAttributesRecord(object runtime.Object, kind, namespace, resource, operation string) Attributes {
return &attributesRecord{
kind: kind,
namespace: namespace,
resource: resource,
operation: operation,
@@ -36,6 +38,10 @@ func NewAttributesRecord(object runtime.Object, namespace, resource, operation s
}
}
func (record *attributesRecord) GetKind() string {
return record.kind
}
func (record *attributesRecord) GetNamespace() string {
return record.namespace
}