Updates to review comments

This commit is contained in:
derekwaynecarr
2014-10-01 10:42:07 -04:00
parent f3859394ab
commit 6625e58a20
6 changed files with 27 additions and 23 deletions

View File

@@ -63,8 +63,8 @@ func NamespaceFrom(ctx Context) (string, bool) {
return namespace, ok
}
// ValidNamespaceOnCreateOrUpdate returns false if the namespace on the context differs from the resource. If the resource has no namespace, it is set to the value in the context.
func ValidNamespaceOnCreateOrUpdate(ctx Context, resource *JSONBase) bool {
// ValidNamespace returns false if the namespace on the context differs from the resource. If the resource has no namespace, it is set to the value in the context.
func ValidNamespace(ctx Context, resource *JSONBase) bool {
ns, ok := NamespaceFrom(ctx)
if len(resource.Namespace) == 0 {
resource.Namespace = ns