Merge pull request #10221 from feihujiang/addSourceForErrorFromServerMessage

Add source in “error from server” message when using kubectl
This commit is contained in:
Maxwell Forbes
2015-06-25 10:56:46 -07:00
6 changed files with 26 additions and 7 deletions

View File

@@ -69,6 +69,7 @@ func (m *Mapper) InfoForData(data []byte, source string) (*Info, error) {
Client: client,
Namespace: namespace,
Name: name,
Source: source,
Object: obj,
ResourceVersion: resourceVersion,

View File

@@ -66,6 +66,9 @@ type Info struct {
Namespace string
Name string
// Optional, Source is the filename or URL to template file (.json or .yaml),
// or stdin to use to handle the resource
Source string
// Optional, this is the most recent value returned by the server if available
runtime.Object
// Optional, this is the most recent resource version the server knows about for