go fmt .
This commit is contained in:
Родитель
6884511f05
Коммит
9ddfa600db
6
main.go
6
main.go
|
@ -72,9 +72,9 @@ var (
|
||||||
flJSON = cli.BoolFlag{
|
flJSON = cli.BoolFlag{
|
||||||
Name: "json",
|
Name: "json",
|
||||||
Usage: "Print output as JSON"}
|
Usage: "Print output as JSON"}
|
||||||
flIsXMLExtension = cli.BoolFlag{
|
flIsXMLExtension = cli.BoolFlag{
|
||||||
Name: "is-xml-extension",
|
Name: "is-xml-extension",
|
||||||
Usage: "Set if this is an XML extension, i.e. PaaS"}
|
Usage: "Set if this is an XML extension, i.e. PaaS"}
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
16
unpublish.go
16
unpublish.go
|
@ -16,8 +16,8 @@ func unpublishVersion(c *cli.Context) {
|
||||||
Name: checkFlag(c, flName.Name),
|
Name: checkFlag(c, flName.Name),
|
||||||
Version: checkFlag(c, flVersion.Name)}
|
Version: checkFlag(c, flVersion.Name)}
|
||||||
|
|
||||||
isXMLExtension := c.Bool(flIsXMLExtension.Name)
|
isXMLExtension := c.Bool(flIsXMLExtension.Name)
|
||||||
buf := bytes.NewBufferString(`<?xml version="1.0" encoding="utf-8" ?>
|
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">
|
<ExtensionImage xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
<!-- WARNING: Ordering of fields matter in this file. -->
|
<!-- WARNING: Ordering of fields matter in this file. -->
|
||||||
<ProviderNameSpace>{{.Namespace}}</ProviderNameSpace>
|
<ProviderNameSpace>{{.Namespace}}</ProviderNameSpace>
|
||||||
|
@ -26,13 +26,13 @@ func unpublishVersion(c *cli.Context) {
|
||||||
<IsInternalExtension>true</IsInternalExtension>
|
<IsInternalExtension>true</IsInternalExtension>
|
||||||
`)
|
`)
|
||||||
|
|
||||||
// All extension should be a JSON extension. The biggest offenders are
|
// All extension should be a JSON extension. The biggest offenders are
|
||||||
// PaaS extensions.
|
// PaaS extensions.
|
||||||
if !isXMLExtension {
|
if !isXMLExtension {
|
||||||
buf.WriteString("<IsJsonExtension>true</IsJsonExtension>")
|
buf.WriteString("<IsJsonExtension>true</IsJsonExtension>")
|
||||||
}
|
}
|
||||||
|
|
||||||
buf.WriteString("</ExtensionImage>")
|
buf.WriteString("</ExtensionImage>")
|
||||||
tpl, err := template.New("unregisterManifest").Parse(buf.String())
|
tpl, err := template.New("unregisterManifest").Parse(buf.String())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalf("template parse error: %v", err)
|
log.Fatalf("template parse error: %v", err)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче