github.com/mmatczuk/gohan@v0.0.0-20170206152520-30e45d9bdb69/extension/gohanscript/lib/file.go (about)

     1  package lib
     2  
     3  import (
     4  	"github.com/cloudwan/gohan/util"
     5  )
     6  
     7  //FetchContent fetch contents from arbitrary path
     8  func FetchContent(path string) (interface{}, error) {
     9  	return util.LoadFile(path)
    10  }
    11  
    12  //SaveContent saves data for path
    13  func SaveContent(path string, data interface{}) error {
    14  	return util.SaveFile(path, data)
    15  }