Skip to content

Commit

Permalink
go fmt .
Browse files Browse the repository at this point in the history
  • Loading branch information
boumenot committed Jun 23, 2017
1 parent 6884511 commit 9ddfa60
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
16 changes: 8 additions & 8 deletions unpublish.go
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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)
Expand Down

0 comments on commit 9ddfa60

Please sign in to comment.