...

Source file src/helm.sh/helm/v3/pkg/chart/errors.go

Documentation: helm.sh/helm/v3/pkg/chart

     1  /*
     2  Copyright The Helm Authors.
     3  Licensed under the Apache License, Version 2.0 (the "License");
     4  you may not use this file except in compliance with the License.
     5  You may obtain a copy of the License at
     6  
     7  http://www.apache.org/licenses/LICENSE-2.0
     8  
     9  Unless required by applicable law or agreed to in writing, software
    10  distributed under the License is distributed on an "AS IS" BASIS,
    11  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  See the License for the specific language governing permissions and
    13  limitations under the License.
    14  */
    15  
    16  package chart
    17  
    18  import "fmt"
    19  
    20  // ValidationError represents a data validation error.
    21  type ValidationError string
    22  
    23  func (v ValidationError) Error() string {
    24  	return "validation: " + string(v)
    25  }
    26  
    27  // ValidationErrorf takes a message and formatting options and creates a ValidationError
    28  func ValidationErrorf(msg string, args ...interface{}) ValidationError {
    29  	return ValidationError(fmt.Sprintf(msg, args...))
    30  }
    31  

View as plain text