github.com/liamawhite/cli-with-i18n@v6.32.1-0.20171122084555-dede0a5c3448+incompatible/command/translatableerror/isolation_segment_not_found_error.go (about)

     1  package translatableerror
     2  
     3  type IsolationSegmentNotFoundError struct {
     4  	Name string
     5  }
     6  
     7  func (IsolationSegmentNotFoundError) Error() string {
     8  	return "Isolation segment '{{.Name}}' not found."
     9  }
    10  
    11  func (e IsolationSegmentNotFoundError) Translate(translate func(string, ...interface{}) string) string {
    12  	return translate(e.Error(), map[string]interface{}{
    13  		"Name": e.Name,
    14  	})
    15  }