datasource: replace metadata map with struct

The loosely-typed metadata map is a load of crap. Make it a struct and
let the compiler help us out.
This commit is contained in:
Alex Crawford
2015-01-22 17:35:39 -08:00
parent d4c617fc23
commit 3e47c09b41
17 changed files with 248 additions and 276 deletions

View File

@@ -17,6 +17,8 @@ package file
import (
"io/ioutil"
"os"
"github.com/coreos/coreos-cloudinit/datasource"
)
type localFile struct {
@@ -40,8 +42,8 @@ func (f *localFile) ConfigRoot() string {
return ""
}
func (f *localFile) FetchMetadata() ([]byte, error) {
return []byte{}, nil
func (f *localFile) FetchMetadata() (datasource.Metadata, error) {
return datasource.Metadata{}, nil
}
func (f *localFile) FetchUserdata() ([]byte, error) {