This commit is contained in:
Christopher Boumenot 2017-06-23 02:42:37 +00:00
Родитель 6884511f05
Коммит 9ddfa600db
2 изменённых файлов: 11 добавлений и 11 удалений

Просмотреть файл

@ -72,9 +72,9 @@ var (
flJSON = cli.BoolFlag{
Name: "json",
Usage: "Print output as JSON"}
flIsXMLExtension = cli.BoolFlag{
Name: "is-xml-extension",
Usage: "Set if this is an XML extension, i.e. PaaS"}
flIsXMLExtension = cli.BoolFlag{
Name: "is-xml-extension",
Usage: "Set if this is an XML extension, i.e. PaaS"}
)
func main() {

Просмотреть файл

@ -16,8 +16,8 @@ func unpublishVersion(c *cli.Context) {
Name: checkFlag(c, flName.Name),
Version: checkFlag(c, flVersion.Name)}
isXMLExtension := c.Bool(flIsXMLExtension.Name)
buf := bytes.NewBufferString(`<?xml version="1.0" encoding="utf-8" ?>
isXMLExtension := c.Bool(flIsXMLExtension.Name)
buf := bytes.NewBufferString(`<?xml version="1.0" encoding="utf-8" ?>
<ExtensionImage xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<!-- WARNING: Ordering of fields matter in this file. -->
<ProviderNameSpace>{{.Namespace}}</ProviderNameSpace>
@ -26,13 +26,13 @@ func unpublishVersion(c *cli.Context) {
<IsInternalExtension>true</IsInternalExtension>
`)
// All extension should be a JSON extension. The biggest offenders are
// PaaS extensions.
if !isXMLExtension {
buf.WriteString("<IsJsonExtension>true</IsJsonExtension>")
}
// All extension should be a JSON extension. The biggest offenders are
// PaaS extensions.
if !isXMLExtension {
buf.WriteString("<IsJsonExtension>true</IsJsonExtension>")
}
buf.WriteString("</ExtensionImage>")
buf.WriteString("</ExtensionImage>")
tpl, err := template.New("unregisterManifest").Parse(buf.String())
if err != nil {
log.Fatalf("template parse error: %v", err)