Created
March 9, 2017 13:40
-
-
Save raphink/4dc8629da66fa5f3a05002890c45f358 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" | |
"github.com/docker/libcompose/config" | |
) | |
func main() { | |
composev2 := ` | |
version: '2' | |
services: | |
hello: | |
image: "tutum/hello-world" | |
ports: | |
- 9090:9090/tcp | |
volumes: | |
test: | |
` | |
if c, err := config.CreateConfig([]byte(composev2)); err != nil { | |
fmt.Println(err) | |
} else { | |
fmt.Printf("%+v\n", c) | |
} | |
composev1 := ` | |
hello: | |
image: "tutum/hello-world" | |
ports: | |
- 9090:9090/tcp | |
` | |
if c, err := config.CreateConfig([]byte(composev1)); err != nil { | |
fmt.Println(err) | |
} else { | |
fmt.Printf("%+v\n", c) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment