Added global xml prefs for simplicity

This commit is contained in:
Mike Farah
2021-12-21 16:52:54 +11:00
parent 6bcbd873a6
commit 2ee9c65bc2
13 changed files with 155 additions and 28 deletions
+3
View File
@@ -3,6 +3,7 @@ package cmd
import (
"os"
"github.com/mikefarah/yq/v4/pkg/yqlib"
"github.com/spf13/cobra"
logging "gopkg.in/op/go-logging.v1"
)
@@ -37,6 +38,8 @@ See https://mikefarah.gitbook.io/yq/ for detailed documentation and examples.`,
}
logging.SetBackend(backend)
yqlib.XmlPreferences.AttributePrefix = xmlAttributePrefix
yqlib.XmlPreferences.ContentName = xmlContentName
},
}