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:
Harsh Thakur
2021-06-15 15:03:42 +05:30
committed by GitHub
parent 377600d0a3
commit 6facdac464
19 changed files with 82 additions and 91 deletions
+1 -1
View File
@@ -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"`
+2 -1
View File
@@ -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"))
}
}
}