Skip to content
This repository has been archived by the owner on Mar 1, 2020. It is now read-only.

Commit

Permalink
Merge pull request #5 from kubepack/fix-path
Browse files Browse the repository at this point in the history
use go pkg
  • Loading branch information
a8uhnf committed Dec 8, 2017
2 parents ea09c5a + a0fcac6 commit 986ef26
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

"github.com/sdboyer/gps"
"github.com/sdboyer/gps/pkgtree"
typ "github.com/kubepack/pack/type"
"github.com/ghodss/yaml"
)

Expand All @@ -22,27 +23,15 @@ import (
//
// This will compile and work...and then blow away any vendor directory present
// in the cwd. Be careful!
type ManifestDef struct {
Package string `json:"package"`
Owners []struct {
Name string `json:"name"`
Email string `json:"email"`
} `json:"owners"`
Dependencies []struct {
Package string `json:"package"`
Version string `json:"version,omitempty"`
Repo string `json:"repo,omitempty"`
Branch string `json:"branch,omitempty"`
} `json:"dependencies"`
}


func main() {
// Assume the current directory is correctly placed on a GOPATH, and that it's the
// root of the project.
root, _ := os.Getwd()
man := root + "/manifest.yaml"
byt, err := ioutil.ReadFile(man)
manStruc := ManifestDef{}
manStruc := typ.ManifestDefinition{}
err = yaml.Unmarshal(byt, &manStruc)
if err != nil {
log.Fatalln("Error Occuered-----", err)
Expand Down

0 comments on commit 986ef26

Please sign in to comment.