Skip to content

Commit

Permalink
Apply gofmt (pulumi#942)
Browse files Browse the repository at this point in the history
  • Loading branch information
t0yv0 authored Mar 12, 2021
1 parent a10c18e commit 5760758
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 23 deletions.
6 changes: 3 additions & 3 deletions azure-go-aci/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func main() {
imageName := "mcr.microsoft.com/azuredocs/aci-helloworld"
containerGroup, err := containerinstance.NewContainerGroup(ctx, "helloworld", &containerinstance.ContainerGroupArgs{
ResourceGroupName: resourceGroup.Name,
OsType: pulumi.String("Linux"),
OsType: pulumi.String("Linux"),
Containers: &containerinstance.ContainerArray{
&containerinstance.ContainerArgs{
Name: pulumi.String("acilinuxpublicipcontainergroup"),
Expand All @@ -27,7 +27,7 @@ func main() {
},
Resources: &containerinstance.ResourceRequirementsArgs{
Requests: &containerinstance.ResourceRequestsArgs{
Cpu: pulumi.Float64(1.0),
Cpu: pulumi.Float64(1.0),
MemoryInGB: pulumi.Float64(1.5),
},
},
Expand All @@ -36,7 +36,7 @@ func main() {
IpAddress: &containerinstance.IpAddressArgs{
Ports: &containerinstance.PortArray{
&containerinstance.PortArgs{
Port: pulumi.Int(80),
Port: pulumi.Int(80),
Protocol: pulumi.String("Tcp"),
},
},
Expand Down
14 changes: 7 additions & 7 deletions azure-go-appservice-docker/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func main() {
imageInDockerHub := "microsoft/azure-appservices-go-quickstart"
helloApp, err := web.NewWebApp(ctx, "helloApp", &web.WebAppArgs{
ResourceGroupName: resourceGroup.Name,
ServerFarmId: plan.ID(),
ServerFarmId: plan.ID(),
SiteConfig: &web.SiteConfigArgs{
AppSettings: web.NameValuePairArray{
&web.NameValuePairArgs{
Expand Down Expand Up @@ -76,12 +76,12 @@ func main() {
}

credentials := pulumi.All(resourceGroup.Name, registry.Name).ApplyT(
func (args []interface{}) (*containerregistry.ListRegistryCredentialsResult, error) {
func(args []interface{}) (*containerregistry.ListRegistryCredentialsResult, error) {
resourceGroupName := args[0].(string)
registryName := args[1].(string)
return containerregistry.ListRegistryCredentials(ctx, &containerregistry.ListRegistryCredentialsArgs{
ResourceGroupName: resourceGroupName,
RegistryName: registryName,
RegistryName: registryName,
})
},
)
Expand All @@ -99,9 +99,9 @@ func main() {
ImageName: registry.LoginServer.ApplyT(func(result string) (string, error) {
return fmt.Sprintf("%s/%s:v1.0.0", result, customImage), nil
}).(pulumi.StringOutput),
Build: &docker.DockerBuildArgs { Context: pulumi.String(fmt.Sprintf("./%s", customImage)) },
Build: &docker.DockerBuildArgs{Context: pulumi.String(fmt.Sprintf("./%s", customImage))},
Registry: &docker.ImageRegistryArgs{
Server: registry.LoginServer,
Server: registry.LoginServer,
Username: adminUsername,
Password: adminPassword,
},
Expand All @@ -112,7 +112,7 @@ func main() {

getStartedApp, err := web.NewWebApp(ctx, "getStartedApp", &web.WebAppArgs{
ResourceGroupName: resourceGroup.Name,
ServerFarmId: plan.ID(),
ServerFarmId: plan.ID(),
SiteConfig: &web.SiteConfigArgs{
AppSettings: web.NameValuePairArray{
&web.NameValuePairArgs{
Expand All @@ -138,7 +138,7 @@ func main() {
Value: pulumi.String("80"),
},
},
AlwaysOn: pulumi.Bool(true),
AlwaysOn: pulumi.Bool(true),
LinuxFxVersion: myImage.ImageName.ApplyT(func(result string) (string, error) {
return fmt.Sprintf("DOCKER|%s", result), nil
}).(pulumi.StringOutput),
Expand Down
2 changes: 1 addition & 1 deletion gcp-go-gke/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ func main() {
if err != nil {
return err
}

engineVersions, err := container.GetEngineVersions(ctx, &container.GetEngineVersionsArgs{})
if err != nil {
return err
Expand Down
10 changes: 5 additions & 5 deletions gcp-py-serverless-raw/gofunc/function.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package helloworld

import (
"fmt"
"net/http"
"fmt"
"net/http"
)

func Handler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/plain")
fmt.Fprintf(w, "Hello World!")

w.Header().Set("Content-Type", "text/plain")
fmt.Fprintf(w, "Hello World!")
}
10 changes: 5 additions & 5 deletions gcp-ts-serverless-raw/gofunc/function.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package helloworld

import (
"fmt"
"net/http"
"fmt"
"net/http"
)

func Handler(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/plain")
fmt.Fprintf(w, "Hello World!")

w.Header().Set("Content-Type", "text/plain")
fmt.Fprintf(w, "Hello World!")
}
2 changes: 0 additions & 2 deletions misc/test/examples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ func getBaseOptions(t *testing.T) integration.ProgramTestOptions {
return base
}



func assertHTTPResult(t *testing.T, output interface{}, headers map[string]string, check func(string) bool) bool {
return assertHTTPResultWithRetry(t, output, headers, 5*time.Minute, check)
}
Expand Down

0 comments on commit 5760758

Please sign in to comment.