Fix golang lint errors (#2068)
* Fix golang lint errors Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> * Typo for fields Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> * Multi error fix Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> * Multi error fix Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> * Add nolint to logtostderr errcheck Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com>
This commit is contained in:
@@ -658,7 +658,7 @@ type (
|
||||
// +optional
|
||||
Prefix *string `json:"prefix,omitempty"`
|
||||
|
||||
// Deprecated: Use Methods instead of Method.
|
||||
// Use Methods instead of Method. This field is going to be deprecated in a future release
|
||||
// HTTP method to access a function.
|
||||
// +optional
|
||||
Method string `json:"method"`
|
||||
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
package v1
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"regexp"
|
||||
@@ -585,7 +586,7 @@ func (e *Environment) Validate() error {
|
||||
if e.Spec.Runtime.PodSpec != nil {
|
||||
for _, container := range e.Spec.Runtime.PodSpec.Containers {
|
||||
if container.Command == nil && container.Image == e.Spec.Runtime.Image && container.Name != e.ObjectMeta.Name {
|
||||
multierror.Append(result, fmt.Errorf("container with image same as runtime image in podspec, must have name same as environment name"))
|
||||
result = multierror.Append(result, errors.New("container with image same as runtime image in podspec, must have name same as environment name"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user