github.com/rotblauer/buffalo@v0.7.1-0.20170112214545-7aa55ef80dd3/render/resolvers/simple.go (about)

     1  package resolvers
     2  
     3  import "io/ioutil"
     4  
     5  // SimpleResolver is dumb and will just look for the file
     6  // exactly where you ask for it.
     7  type SimpleResolver struct{}
     8  
     9  // Read is dumb and will just look for the file
    10  // exactly where you ask for it.
    11  func (s *SimpleResolver) Read(name string) ([]byte, error) {
    12  	return ioutil.ReadFile(name)
    13  }
    14  
    15  // Resolve is dumb and will just look for the file
    16  // exactly where you ask for it.
    17  func (s *SimpleResolver) Resolve(name string) (string, error) {
    18  	return name, nil
    19  }