Use typeurl package for spec types

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby
2017-07-05 15:11:59 -07:00
parent f8720382b3
commit a60511d5aa
22 changed files with 163 additions and 264 deletions

View File

@@ -6,7 +6,6 @@ import (
"bytes"
"context"
"io"
"io/ioutil"
"os"
"path/filepath"
@@ -82,11 +81,6 @@ func (b *bundle) Connect(ctx context.Context, remote bool) (*client.Client, erro
}, opt)
}
// spec returns the spec written to the bundle
func (b *bundle) Spec() ([]byte, error) {
return ioutil.ReadFile(filepath.Join(b.path, configFilename))
}
// Delete deletes the bundle from disk
func (b *bundle) Delete() error {
return os.RemoveAll(b.path)