revision = "9e8dc3f972df6c8fcc0375ef492c24d0bb204857"
   version = "1.6.3"
 
+[[projects]]
+  name = "gopkg.in/yaml.v2"
+  packages = ["."]
+  revision = "5420a8b6744d3b0345ab293f6fcba19c978f1183"
+  version = "v2.2.1"
+
 [solve-meta]
   analyzer-name = "dep"
   analyzer-version = 1
-  inputs-digest = "9e242ef2da883faa526d0301106c1de8202a8b14eecebf2470863a2e60ea195b"
+  inputs-digest = "fa4cfc44b5a6fe6939a41f6fd3f2efca1f840f04854eee11cfd79b975074e048"
   solver-name = "gps-cdcl"
   solver-version = 1
 
--- /dev/null
+/**
+ * Copyright (c) 2018 ZTE Corporation.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * and the Apache License 2.0 which both accompany this distribution,
+ * and are available at http://www.eclipse.org/legal/epl-v10.html
+ * and http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Contributors:
+ *     ZTE - initial Project
+ */
+package util
+
+import (
+       "gopkg.in/yaml.v2"
+)
+
+/**
+* type T struct {
+*   F int `yaml:"a, omitempty"`
+*   B int
+* }
+* var t T
+* yaml.Marshal(&T{B:2})   /// returns "b: 2 \n"
+* yaml.Marshal(&T{F:1})   // returns "a: 1 \nb: 0\n"
+ */
+func MarshalYaml(in interface{}) (string, error) {
+       b, err := yaml.Marshal(in)
+       if err != nil {
+               return "", err
+       } else {
+               return string(b), nil
+       }
+}
+
+/**
+* var t T
+* yaml.Unmarshal([]byte("a: 1\nb: 2"), &t)
+*
+ */
+func UnmarshalYaml(str string, out interface{}) error {
+       return yaml.Unmarshal([]byte(str), out)
+}