top
(README.md)
[![Build Status](https://travis-ci.org/cloudfoundry-incubator/candiedyaml.svg)](https://travis-ci.org/cloudfoundry-incubator/candiedyaml)
[![GoDoc](https://godoc.org/github.com/cloudfoundry-incubator/candiedyaml?status.svg)](https://godoc.org/github.com/cloudfoundry-incubator/candiedyaml)


candiedyaml
===========

YAML for Go

A YAML 1.1 parser with support for YAML 1.2 features

Usage
-----

```go
package myApp

import (
  "github.com/cloudfoundry-incubator/candiedyaml"
  "fmt"
  "os"
)

func main() {
  file, err := os.Open("path/to/some/file.yml")
  if err != nil {
    println("File does not exist:", err.Error())
    os.Exit(1)
  }
  defer file.Close()

  document := new(interface{})
  decoder := candiedyaml.NewDecoder(file)
  err = decoder.Decode(document)
  
  if err != nil {
    println("Failed to decode document:", err.Error())
  }
  
  println("parsed yml into interface:", fmt.Sprintf("%#v", document))
  
  fileToWrite, err := os.Create("path/to/some/new/file.yml")
  if err != nil {
    println("Failed to open file for writing:", err.Error())
    os.Exit(1)
  }
  defer fileToWrite.Close()

  encoder := candiedyaml.NewEncoder(fileToWrite)
  err = encoder.Encode(document)

  if err != nil {
    println("Failed to encode document:", err.Error())
    os.Exit(1)
  }
  
  return
}
```

Imported by 225 package(s)

  1. code.cloudfoundry.org/buildpackapplifecycle/buildpackrunner
  2. code.cloudfoundry.org/buildpackapplifecycle/launcher
  3. code.cloudfoundry.org/inigo/world
  4. github.com/ArthurHlt/cli-plugin-repo/parser
  5. github.com/Azure/azure-docker-extension
  6. github.com/Bennell/cf-redis-broker/agentconfig
  7. github.com/Bennell/cf-redis-broker/brokerconfig
  8. github.com/BnLCr/os/cmd/cloudinit
  9. github.com/BnLCr/os/cmd/control
  10. github.com/BnLCr/os/compose
  11. github.com/BnLCr/os/config
  12. github.com/BnLCr/os/util
  13. github.com/Bo0mer/enslaver/config
  14. github.com/Bo0mer/os-agent/config
  15. github.com/BrianMMcClain/gorouter/config
  16. github.com/DanLavine/gorouter/config
  17. github.com/Dhilip-Kumar-S/bosh-micro-cli/deployment
  18. github.com/Dhilip-Kumar-S/bosh-micro-cli/release
  19. github.com/Dhilip-Kumar-S/bosh-micro-cli/stemcell
  20. github.com/Dhilip-Kumar-S/bosh-micro-cli/templatescompiler/fakes
  21. github.com/Dhilip-Kumar-S/bosh-micro-cli/testutils
  22. github.com/JamesClonk/cli-plugin-repo/parser
  23. github.com/RedisLabs/cf-redislabs-broker/redislabs/config
  24. github.com/absourdnoise/libcompose/config
  25. github.com/absourdnoise/libcompose/utils
  26. github.com/adrianco/spigo/compose
  27. github.com/ahmetalpbalkan/azure-docker-extension
  28. github.com/allencloud/libcompose/project
  29. github.com/allencloud/libcompose/utils
  30. github.com/andrelucas/os/compose
  31. github.com/andrelucas/os/config
  32. github.com/andrelucas/os/util
  33. github.com/arschles/cf-redislabs-broker/redislabs/config
  34. github.com/benlaplanche/cf-basic-auth-route-service/servicebroker/config
  35. github.com/benlaplanche/cli-plugin-repo/parser
  36. github.com/bingosummer/azure-docker-extension
  37. github.com/bluemixgaragelondon/cf-blue-green-deploy/manifest/fakes
  38. github.com/bluemixgaragelondon/cli-plugin-repo/parser
  39. github.com/bnlcr/os/cmd/cloudinit
  40. github.com/bnlcr/os/cmd/control
  41. github.com/bnlcr/os/compose
  42. github.com/bnlcr/os/config
  43. github.com/bnlcr/os/util
  44. github.com/bosh-io/web/ui/job
  45. github.com/brahmaroutu/cli/src/cf/manifest
  46. github.com/brianmmcclain/gorouter/config
  47. github.com/caseyhadden/gorouter/config
  48. github.com/chanwit/cli/cf/manifest
  49. github.com/cloudfoundry-community/brooklyn-plugin/io
  50. github.com/cloudfoundry-incubator/asg-creator/config
  51. github.com/cloudfoundry-incubator/brooklyn-plugin/io
  52. github.com/cloudfoundry-incubator/buildpack_app_lifecycle/buildpackrunner
  53. github.com/cloudfoundry-incubator/buildpack_app_lifecycle/launcher
  54. github.com/cloudfoundry-incubator/inigo/world
  55. github.com/cloudfoundry-incubator/linux-circus/buildpackrunner
  56. github.com/cloudfoundry-incubator/spiff
  57. github.com/cloudfoundry-incubator/spiff/yaml
  58. github.com/cloudfoundry/buildpackapplifecycle/buildpackrunner
  59. github.com/cloudfoundry/buildpackapplifecycle/launcher
  60. github.com/cloudfoundry/inigo/world
  61. github.com/compozed/deployadactyl/config
  62. github.com/compozed/deployadactyl/controller/deployer/manifestro
  63. github.com/compozed/deployadactyl/eventmanager/handlers/envvar
  64. github.com/compozed/deployadactyl/eventmanager/handlers/routemapper
  65. github.com/concourse/turbine/resource
  66. github.com/contraband/anderson
  67. github.com/cppforlife/bosh-hub/ui/job
  68. github.com/cppforlife/bosh-provisioner/deployment/manifest
  69. github.com/cppforlife/bosh-provisioner/release/job/manifest
  70. github.com/cppforlife/bosh-provisioner/release/manifest
  71. github.com/crafet/cli/cf/manifest
  72. github.com/crafet/gorouter/config
  73. github.com/csterwa/cli-plugin-repo/parser
  74. github.com/dAdAbird/libcompose/config
  75. github.com/dAdAbird/libcompose/utils
  76. github.com/danhigham/cli-plugin-repo/parser
  77. github.com/danlavine/gorouter/config
  78. github.com/datawolf/libcompose/project
  79. github.com/datawolf/libcompose/utils
  80. github.com/datawolf/os/compose
  81. github.com/datawolf/os/config
  82. github.com/datawolf/os/util
  83. github.com/davidehringer/cli-plugin-repo/parser
  84. github.com/ddimitrow/os-agent/config
  85. github.com/dhilipkumars/cli/cf/manifest
  86. github.com/dinp/gorouter/config
  87. github.com/drnic/bosh-init/deployment/manifest
  88. github.com/drnic/bosh-init/deployment/stemcell
  89. github.com/drnic/bosh-init/installation/manifest
  90. github.com/drnic/bosh-init/release
  91. github.com/drnic/bosh-init/release/set/manifest
  92. github.com/drnic/bosh-init/templatescompiler/fakes
  93. github.com/drnic/bosh-init/testutils
  94. github.com/dustinrc/libcompose/config
  95. github.com/dustinrc/libcompose/utils
  96. github.com/euforic/yaml
  97. github.com/fraenkel/spiff
  98. github.com/fraenkel/spiff/yaml
  99. github.com/frapposelli/anderson
  100. github.com/geofffranks/cli-plugin-repo/parser
  101. github.com/geofffranks/spiff
  102. github.com/geofffranks/spiff/yaml
  103. github.com/ghodss/yaml
  104. github.com/gondor/libcompose/project
  105. github.com/gondor/libcompose/utils
  106. github.com/google/googet
  107. github.com/goonzoid/anderson
  108. github.com/guidowb/cli-plugin-repo/parser
  109. github.com/guidowb/cli/cf/manifest
  110. github.com/hatofmonkeys/cloudfocker/config
  111. github.com/hyperhq/libcompose/config
  112. github.com/hyperhq/libcompose/utils
  113. github.com/iakio/devproxy
  114. github.com/ilovewchao/cli/cf/manifest
  115. github.com/imikushin/trash/conf
  116. github.com/jberkhahn/cli-plugin-repo/parser
  117. github.com/jeaniejung/cli-plugin-repo/parser
  118. github.com/jfmyers9/spiff
  119. github.com/jfmyers9/spiff/yaml
  120. github.com/jhunt/cli-plugin-repo/parser
  121. github.com/joek/gorouter/config
  122. github.com/jtuchscherer/cli-plugin-repo/parser
  123. github.com/julz/gorouter/config
  124. github.com/kanosaki/iwalk
  125. github.com/kanosaki/picwall
  126. github.com/lnguyen/cli-plugin-repo/parser
  127. github.com/longnguyen11288/cli-plugin-repo/parser
  128. github.com/lynxbat/gorouter/config
  129. github.com/margic/os/compose
  130. github.com/margic/os/config
  131. github.com/margic/os/util
  132. github.com/matthewmcnew/gorouter/config
  133. github.com/mgazz/ila/config
  134. github.com/miqui/azure-docker-extension
  135. github.com/miqui/cli/cf/manifest
  136. github.com/mmb/boosh
  137. github.com/moriyoshi/devproxy
  138. github.com/negz/secret-volume/secrets
  139. github.com/pivotal-cf/cf-rabbitmq-broker
  140. github.com/pivotal-cf/cf-redis-broker/agentconfig
  141. github.com/pivotal-cf/cf-redis-broker/brokerconfig
  142. github.com/pivotal-cf/cf-redis-broker/instance/backup
  143. github.com/pivotal-cf/cf-redis-broker/restoreconfig
  144. github.com/rakutentech/bosh-init/config
  145. github.com/rakutentech/bosh-init/deployment/manifest
  146. github.com/rakutentech/bosh-init/installation/manifest
  147. github.com/rakutentech/bosh-init/release
  148. github.com/rakutentech/bosh-init/release/job
  149. github.com/rakutentech/bosh-init/release/set/manifest
  150. github.com/rakutentech/bosh-init/stemcell
  151. github.com/rakutentech/bosh-init/templatescompiler/fakes
  152. github.com/rakutentech/bosh-init/testutils
  153. github.com/rakutentech/gorouter/config
  154. github.com/rancher/os/cmd/cloudinitsave
  155. github.com/rancher/os/cmd/control
  156. github.com/rancher/os/compose
  157. github.com/rancher/os/config
  158. github.com/rancher/os/config/cloudinit/datasource/metadata/packet
  159. github.com/rancher/os/config/cmdline
  160. github.com/rancher/os/util
  161. github.com/rancher/os/util/network
  162. github.com/rancher/trash/conf
  163. github.com/rancherio/os/cmd/cloudinitsave
  164. github.com/rancherio/os/cmd/control
  165. github.com/rancherio/os/compose
  166. github.com/rancherio/os/config
  167. github.com/rancherio/os/config/cmdline
  168. github.com/rancherio/os/util
  169. github.com/rancherio/os/util/network
  170. github.com/ritesh0919/gorouter/config
  171. github.com/robertgmoss/cli-plugin-repo/parser
  172. github.com/robertgmoss/cli/cf/manifest
  173. github.com/robvanmieghem/libcompose/project
  174. github.com/robvanmieghem/libcompose/utils
  175. github.com/rosenhouse/bosh-bootloader/bosh
  176. github.com/rosenhouse/bosh-bootloader/boshinit
  177. github.com/rosenhouse/gomegamatchers
  178. github.com/sclevine/bosh-provisioner/deployment/manifest
  179. github.com/sclevine/bosh-provisioner/release/job/manifest
  180. github.com/sclevine/bosh-provisioner/release/manifest
  181. github.com/shashankmjain/gorouter/config
  182. github.com/shashidharatd/cli/cf/manifest
  183. github.com/shashidharatd/gorouter/config
  184. github.com/shin-/libcompose/project
  185. github.com/shin-/libcompose/utils
  186. github.com/shutej/spiff/yaml
  187. github.com/skippbox/kompose/utils
  188. github.com/sklevenz/spiff
  189. github.com/sklevenz/spiff/dynaml
  190. github.com/sklevenz/spiff/yaml
  191. github.com/sneal/boshdelta/boshdelta
  192. github.com/soutenniza/cli-plugin-repo/parser
  193. github.com/starkandwayne/cf-cli-plugin-repo/parser
  194. github.com/starkandwayne/cf-cli/cf/manifest
  195. github.com/supiyun/gorouter/config
  196. github.com/swisscom/consul-release/src/acceptance-tests/helpers
  197. github.com/swisscom/spiff
  198. github.com/swisscom/spiff/yaml
  199. github.com/tcnksm/cli-plugin-repo/parser
  200. github.com/tenmozes/wwhrd
  201. github.com/timperman/libcompose/config
  202. github.com/timperman/libcompose/utils
  203. github.com/tjarratt/cli/cf/manifest
  204. github.com/uniseraph/libcompose/config
  205. github.com/uniseraph/libcompose/utils
  206. github.com/vito/boosh
  207. github.com/vito/spiff
  208. github.com/vito/spiff/yaml
  209. github.com/voelzmo/bosh-hub/ui/job
  210. github.com/voelzmo/bosh-provisioner/deployment/manifest
  211. github.com/voelzmo/bosh-provisioner/release/job/manifest
  212. github.com/voelzmo/bosh-provisioner/release/manifest
  213. github.com/voelzmo/gorouter/config
  214. github.com/wfernandes/gorouter/config
  215. github.com/wulonghui/gorouter/config
  216. github.com/xchapter7x/cli-plugin-repo/parser
  217. github.com/xingzhou/cli/cf/manifest
  218. github.com/xiwenc/cli-plugin-repo/parser
  219. github.com/xoebus/anderson
  220. github.com/xoebus/cli-plugin-repo/parser
  221. github.com/xozrc/libcompose/config
  222. github.com/xozrc/libcompose/utils
  223. github.com/zengbo/gorouter/config
  224. github.com/zhangwei1234/docker-builder/config
  225. github.com/zhangwei1234/docker-scheduler/config

Imported only in test by 44 package(s)

  1. github.com/Bennell/cf-redis-broker/agentintegration
  2. github.com/DanLavine/gorouter
  3. github.com/Samze/cf-blue-green-deploy
  4. github.com/absourdnoise/libcompose/yaml
  5. github.com/amitkgupta/runtime-schema/models
  6. github.com/archgrove/cf-blue-green-deploy
  7. github.com/bluemixgaragelondon/cf-blue-green-deploy
  8. github.com/bluemixgaragelondon/cf-blue-green-deploy/manifest
  9. github.com/caseyhadden/gorouter
  10. github.com/cloudfoundry-incubator/asg-creator/iptools
  11. github.com/cloudfoundry-incubator/spiff/flow
  12. github.com/crafet/gorouter
  13. github.com/dAdAbird/libcompose/yaml
  14. github.com/danlavine/gorouter
  15. github.com/dustinrc/libcompose/yaml
  16. github.com/fraenkel/spiff/flow
  17. github.com/geofffranks/spiff/flow
  18. github.com/gerhard/cf-blue-green-deploy
  19. github.com/hyperhq/libcompose/yaml
  20. github.com/jfmyers9/spiff/flow
  21. github.com/joek/gorouter
  22. github.com/julz/gorouter
  23. github.com/lynxbat/gorouter
  24. github.com/matthewmcnew/gorouter
  25. github.com/pivotal-cf/cf-redis-broker/agentintegration
  26. github.com/qinguoan/vulcan/router
  27. github.com/rakutentech/gorouter
  28. github.com/ritesh0919/gorouter
  29. github.com/rosenhouse/bosh-bootloader/boshinit/manifests
  30. github.com/samze/cf-blue-green-deploy
  31. github.com/shashankmjain/gorouter
  32. github.com/shashidharatd/gorouter
  33. github.com/shutej/spiff/flow
  34. github.com/sklevenz/spiff/flow
  35. github.com/supiyun/gorouter
  36. github.com/swisscom/spiff/flow
  37. github.com/timperman/libcompose/yaml
  38. github.com/uniseraph/libcompose/yaml
  39. github.com/vito/spiff/flow
  40. github.com/voelzmo/gorouter
  41. github.com/wfernandes/gorouter
  42. github.com/wulonghui/gorouter
  43. github.com/xozrc/libcompose/yaml
  44. github.com/zengbo/gorouter

Test imports 2 package(s)

  1. github.com/onsi/ginkgo
  2. github.com/onsi/gomega