-
-
Save roscopecoltran/e1f1e104d44d2a406189c7cf70708cf7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
//"os" | |
"io/ioutil" | |
// "gopkg.in/src-d/go-git.v4" | |
"gopkg.in/yaml.v2" | |
) | |
func main() { | |
// url := os.Args[1] | |
// fmt.Printf("Retrieving latest commit from: %q ...\n", url) | |
// r := git.NewMemoryRepository() | |
// if err := r.Clone(&git.CloneOptions{URL: url}); err != nil { | |
// panic(err) | |
// } | |
// head, err := r.Head() | |
// if err != nil { | |
// panic(err) | |
// } | |
// commit, err := r.Commit(head.Hash()) | |
// if err != nil { | |
// panic(err) | |
// } | |
// fmt.Println(commit) | |
data, err := ioutil.ReadFile("deploy.yml") | |
if err != nil { | |
panic(err) | |
} | |
var config Config | |
err = yaml.Unmarshal(data, &config) | |
fmt.Printf("Value: %#v\n", config) | |
} | |
type Config struct { | |
Install []string | |
Deploy_method string | |
Destination string | |
Number int | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment