refactor(*): Break apart packages

This commit is contained in:
Brian Waldon
2014-03-18 09:00:41 -07:00
parent 5185fe48da
commit d2dabee0c6
21 changed files with 330 additions and 262 deletions

21
datasource/file.go Normal file
View File

@@ -0,0 +1,21 @@
package datasource
import (
"io/ioutil"
)
type localFile struct {
path string
}
func NewLocalFile(path string) *localFile {
return &localFile{path}
}
func (self *localFile) Fetch() ([]byte, error) {
return ioutil.ReadFile(self.path)
}
func (self *localFile) Type() string {
return "local-file"
}