github.com/grafana/tanka@v0.26.1-0.20240506093700-c22cfc35c21a/pkg/jsonnet/jpath/errors.go (about)

     1  package jpath
     2  
     3  import (
     4  	"errors"
     5  	"fmt"
     6  )
     7  
     8  // ErrorNoRoot means no rootDir was found in the parent directories
     9  var ErrorNoRoot = errors.New(`unable to identify the project root.
    10  Tried to find 'tkrc.yaml' or 'jsonnetfile.json' in the parent directories.
    11  Please refer to https://tanka.dev/directory-structure for more information`)
    12  
    13  // ErrorNoBase means no baseDir was found in the parent directories
    14  type ErrorNoBase struct {
    15  	filename string
    16  }
    17  
    18  func (e ErrorNoBase) Error() string {
    19  	return fmt.Sprintf(`Unable to identify the environments base directory.
    20  Tried to find '%s' in the parent directories.
    21  Please refer to https://tanka.dev/directory-structure for more information`, e.filename)
    22  }
    23  
    24  // ErrorFileNotFound means that the searched file was not found
    25  type ErrorFileNotFound struct {
    26  	filename string
    27  }
    28  
    29  func (e ErrorFileNotFound) Error() string {
    30  	return e.filename + " not found"
    31  }