Merge lp:~allenap/gwacl/lint into lp:gwacl

Proposed by Gavin Panella
Status: Merged
Approved by: Gavin Panella
Approved revision: 182
Merged at revision: 181
Proposed branch: lp:~allenap/gwacl/lint
Merge into: lp:gwacl
Diff against target: 318 lines (+40/-40)
11 files modified
example/storage/run.go (+8/-8)
httperror.go (+1/-1)
management_base.go (+4/-4)
names.go (+2/-2)
poller.go (+1/-1)
poller_test.go (+1/-1)
x509dispatcher.go (+1/-1)
x509dispatcher_test.go (+4/-4)
x509session_test.go (+1/-1)
xmlobjects.go (+2/-2)
xmlobjects_test.go (+15/-15)
To merge this branch: bzr merge lp:~allenap/gwacl/lint
Reviewer Review Type Date Requested Status
Gavin Panella Approve
Review via email: mp+174430@code.launchpad.net

Commit message

Reformat code and remove trailing white-space.

To post a comment you must log in.
Revision history for this message
Gavin Panella (allenap) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'example/storage/run.go'
--- example/storage/run.go 2013-06-25 05:55:14 +0000
+++ example/storage/run.go 2013-07-12 14:49:28 +0000
@@ -140,31 +140,31 @@
140 invocation parameters:140 invocation parameters:
141141
142 Show existing storage containers:142 Show existing storage containers:
143 listcontainers 143 listcontainers
144144
145 List files in a container:145 List files in a container:
146 -container=<container> list146 -container=<container> list
147147
148 Set access on a container:148 Set access on a container:
149 -container=<container> -acl <container|blob|private> containeracl 149 -container=<container> -acl <container|blob|private> containeracl
150150
151 Get a file from a container (it's returned on stdout):151 Get a file from a container (it's returned on stdout):
152 -container=<container> -filename=<filename> getblob 152 -container=<container> -filename=<filename> getblob
153 153
154 Upload a file to a block blob:154 Upload a file to a block blob:
155 -container=<container> -filename=<filename> addblock 155 -container=<container> -filename=<filename> addblock
156156
157 Delete a blob:157 Delete a blob:
158 -container=<container> -filename=<filename> deleteblob 158 -container=<container> -filename=<filename> deleteblob
159159
160 Create an empty page blob:160 Create an empty page blob:
161 -container=<container> -blobname=<blobname> -size=<bytes>161 -container=<container> -blobname=<blobname> -size=<bytes>
162 -blobtype="page" putblob 162 -blobtype="page" putblob
163163
164 Upload a file to a page blob's page. The range parameters must be164 Upload a file to a page blob's page. The range parameters must be
165 (modulo 512)-(modulo 512 -1), eg: -pagerange=0-511165 (modulo 512)-(modulo 512 -1), eg: -pagerange=0-511
166 -container=<container> -blobname=<blobname> -pagerange=<N-N>166 -container=<container> -blobname=<blobname> -pagerange=<N-N>
167 -filename=<local file> putpage 167 -filename=<local file> putpage
168 `)168 `)
169}169}
170170
171171
=== modified file 'httperror.go'
--- httperror.go 2013-07-11 10:48:03 +0000
+++ httperror.go 2013-07-12 14:49:28 +0000
@@ -95,7 +95,7 @@
95// the given message plus the error string from the original error.95// the given message plus the error string from the original error.
96// It preserves the value of the error types it knows about (currently only96// It preserves the value of the error types it knows about (currently only
97// ServerError).97// ServerError).
98// 98//
99// The main purpose of this method is to offer a unified way to99// The main purpose of this method is to offer a unified way to
100// extend the information present in errors while still not losing the100// extend the information present in errors while still not losing the
101// additioning information present on specific errors gwacl knows out to extend101// additioning information present on specific errors gwacl knows out to extend
102102
=== modified file 'management_base.go'
--- management_base.go 2013-07-12 04:45:34 +0000
+++ management_base.go 2013-07-12 14:49:28 +0000
@@ -107,7 +107,7 @@
107}107}
108108
109// ListHostedServices loads a list of HostedServiceDescriptor objects from the109// ListHostedServices loads a list of HostedServiceDescriptor objects from the
110// Azure management API. 110// Azure management API.
111// HostedServiceDescriptor objects contains a small subset of the fields present in111// HostedServiceDescriptor objects contains a small subset of the fields present in
112// HostedService objects.112// HostedService objects.
113// See http://msdn.microsoft.com/en-us/library/windowsazure/ee460781.aspx113// See http://msdn.microsoft.com/en-us/library/windowsazure/ee460781.aspx
@@ -182,7 +182,7 @@
182// DeleteHostedService deletes the named hosted service.182// DeleteHostedService deletes the named hosted service.
183// See http://msdn.microsoft.com/en-us/library/windowsazure/gg441305.aspx183// See http://msdn.microsoft.com/en-us/library/windowsazure/gg441305.aspx
184func (api *ManagementAPI) DeleteHostedService(serviceName string) error {184func (api *ManagementAPI) DeleteHostedService(serviceName string) error {
185 response, err := api.session.delete("services/hostedservices/" + serviceName, "2010-10-28")185 response, err := api.session.delete("services/hostedservices/"+serviceName, "2010-10-28")
186 if err != nil {186 if err != nil {
187 return err187 return err
188 }188 }
@@ -266,7 +266,7 @@
266// DeleteStorageAccount deletes a storage account.266// DeleteStorageAccount deletes a storage account.
267// See http://msdn.microsoft.com/en-us/library/windowsazure/hh264517.aspx267// See http://msdn.microsoft.com/en-us/library/windowsazure/hh264517.aspx
268func (api *ManagementAPI) DeleteStorageAccount(storageAccountName string) error {268func (api *ManagementAPI) DeleteStorageAccount(storageAccountName string) error {
269 response, err := api.session.delete("services/storageservices/" + storageAccountName, "2011-06-01")269 response, err := api.session.delete("services/storageservices/"+storageAccountName, "2011-06-01")
270 if err != nil {270 if err != nil {
271 return err271 return err
272 }272 }
@@ -303,7 +303,7 @@
303303
304func (api *ManagementAPI) _DeleteDisk(diskName string) error {304func (api *ManagementAPI) _DeleteDisk(diskName string) error {
305 response, err := api.session.delete(305 response, err := api.session.delete(
306 "services/disks/" + diskName, "2012-08-01")306 "services/disks/"+diskName, "2012-08-01")
307 if err != nil {307 if err != nil {
308 return err308 return err
309 }309 }
310310
=== modified file 'names.go'
--- names.go 2013-07-11 14:06:24 +0000
+++ names.go 2013-07-12 14:49:28 +0000
@@ -95,7 +95,7 @@
95// the same sequence!95// the same sequence!
96func MakeRandomDiskName(prefix string) string {96func MakeRandomDiskName(prefix string) string {
97 // Azure documentation does not say what the maximum size of a disk name97 // Azure documentation does not say what the maximum size of a disk name
98 // is. Testing indicate that 50 works. 98 // is. Testing indicate that 50 works.
99 return makeRandomIdentifier(prefix, 50)99 return makeRandomIdentifier(prefix, 50)
100}100}
101101
@@ -110,7 +110,7 @@
110// the same sequence!110// the same sequence!
111func MakeRandomRoleName(prefix string) string {111func MakeRandomRoleName(prefix string) string {
112 // Azure documentation does not say what the maximum size of a role name112 // Azure documentation does not say what the maximum size of a role name
113 // is. Testing indicate that 50 works. 113 // is. Testing indicate that 50 works.
114 return makeRandomIdentifier(prefix, 50)114 return makeRandomIdentifier(prefix, 50)
115}115}
116116
117117
=== modified file 'poller.go'
--- poller.go 2013-07-12 03:23:57 +0000
+++ poller.go 2013-07-12 14:49:28 +0000
@@ -11,7 +11,7 @@
11// Generic poller interface/methods.11// Generic poller interface/methods.
1212
13// A poller exposes two methods to query a remote server and decide when13// A poller exposes two methods to query a remote server and decide when
14// the response given by the server means that the polling is finished. 14// the response given by the server means that the polling is finished.
15type poller interface {15type poller interface {
16 poll() (*x509Response, error)16 poll() (*x509Response, error)
17 isDone(*x509Response, error) (bool, error)17 isDone(*x509Response, error) (bool, error)
1818
=== modified file 'poller_test.go'
--- poller_test.go 2013-07-12 04:22:16 +0000
+++ poller_test.go 2013-07-12 14:49:28 +0000
@@ -184,7 +184,7 @@
184 // it's probably worth it to thoroughly test performOperationPolling().184 // it's probably worth it to thoroughly test performOperationPolling().
185185
186 // Fake 2 responses in sequence: a 'InProgress' response and then a186 // Fake 2 responses in sequence: a 'InProgress' response and then a
187 // 'Succeeded' response. 187 // 'Succeeded' response.
188 firstResponse := DispatcherResponse{188 firstResponse := DispatcherResponse{
189 response: &x509Response{189 response: &x509Response{
190 Body: []byte(fmt.Sprintf(operationXMLTemplate, "InProgress")),190 Body: []byte(fmt.Sprintf(operationXMLTemplate, "InProgress")),
191191
=== modified file 'x509dispatcher.go'
--- x509dispatcher.go 2013-07-12 02:52:34 +0000
+++ x509dispatcher.go 2013-07-12 14:49:28 +0000
@@ -176,7 +176,7 @@
176 return response, nil176 return response, nil
177}177}
178178
179// The maximum number of redirection-followings allowed. 179// The maximum number of redirection-followings allowed.
180var _CURL_MAX_REDIRECTS = 10180var _CURL_MAX_REDIRECTS = 10
181181
182// makeCurlRequest produces a curl.CURL representing the request.182// makeCurlRequest produces a curl.CURL representing the request.
183183
=== modified file 'x509dispatcher_test.go'
--- x509dispatcher_test.go 2013-07-12 04:25:31 +0000
+++ x509dispatcher_test.go 2013-07-12 14:49:28 +0000
@@ -79,7 +79,7 @@
79 c.Assert(err, IsNil)79 c.Assert(err, IsNil)
80 path := "/foo/bar"80 path := "/foo/bar"
81 version := "test-version"81 version := "test-version"
82 request := newX509RequestGET(server.URL + path, version)82 request := newX509RequestGET(server.URL+path, version)
8383
84 response, err := performX509CurlRequest(session, request)84 response, err := performX509CurlRequest(session, request)
85 c.Assert(err, IsNil)85 c.Assert(err, IsNil)
@@ -104,7 +104,7 @@
104 c.Assert(err, IsNil)104 c.Assert(err, IsNil)
105 path := "/foo/bar"105 path := "/foo/bar"
106 version := "test-version"106 version := "test-version"
107 request := newX509RequestGET(server.URL + path, version)107 request := newX509RequestGET(server.URL+path, version)
108108
109 _, err = performX509CurlRequest(session, request)109 _, err = performX509CurlRequest(session, request)
110 c.Check(err, ErrorMatches, ".*Number of redirects hit maximum amount.*")110 c.Check(err, ErrorMatches, ".*Number of redirects hit maximum amount.*")
@@ -168,7 +168,7 @@
168 c.Assert(err, IsNil)168 c.Assert(err, IsNil)
169 path := "/foo/bar"169 path := "/foo/bar"
170 version := "test-version"170 version := "test-version"
171 request := newX509RequestDELETE(server.URL + path, version)171 request := newX509RequestDELETE(server.URL+path, version)
172172
173 response, err := performX509CurlRequest(session, request)173 response, err := performX509CurlRequest(session, request)
174 c.Assert(err, IsNil)174 c.Assert(err, IsNil)
@@ -220,7 +220,7 @@
220 session, err := newX509Session("subscriptionid", "cert.pem")220 session, err := newX509Session("subscriptionid", "cert.pem")
221 c.Assert(err, IsNil)221 c.Assert(err, IsNil)
222 path := "/foo/bar"222 path := "/foo/bar"
223 request := newX509RequestGET(server.URL + path, "testversion")223 request := newX509RequestGET(server.URL+path, "testversion")
224224
225 response, err := performX509CurlRequest(session, request)225 response, err := performX509CurlRequest(session, request)
226 c.Assert(err, IsNil)226 c.Assert(err, IsNil)
227227
=== modified file 'x509session_test.go'
--- x509session_test.go 2013-07-12 04:22:16 +0000
+++ x509session_test.go 2013-07-12 14:49:28 +0000
@@ -193,7 +193,7 @@
193 rigRecordingDispatcher(&recordedRequests)193 rigRecordingDispatcher(&recordedRequests)
194194
195 version := "test-version"195 version := "test-version"
196 receivedResponse, err := session.get(uri,version)196 receivedResponse, err := session.get(uri, version)
197 c.Assert(err, IsNil)197 c.Assert(err, IsNil)
198198
199 c.Assert(len(recordedRequests), Equals, 1)199 c.Assert(len(recordedRequests), Equals, 1)
200200
=== modified file 'xmlobjects.go'
--- xmlobjects.go 2013-07-12 12:58:03 +0000
+++ xmlobjects.go 2013-07-12 14:49:28 +0000
@@ -157,7 +157,7 @@
157157
158// GetLatestUbuntuImage returns the most recent released available OSImage,158// GetLatestUbuntuImage returns the most recent released available OSImage,
159// for the given release name and location. The 'releaseName' parameter is159// for the given release name and location. The 'releaseName' parameter is
160// the Ubuntu version number present in the 'ImageFamily' tag present in 160// the Ubuntu version number present in the 'ImageFamily' tag present in
161// Azure's representation of an OS Image (e.g. '12.04', '12.10').161// Azure's representation of an OS Image (e.g. '12.04', '12.10').
162func (images *Images) GetLatestUbuntuImage(releaseName string, location string) (image *OSImage, err error) {162func (images *Images) GetLatestUbuntuImage(releaseName string, location string) (image *OSImage, err error) {
163 // The Less method defined above can panic if one of the published dates cannot be parsed,163 // The Less method defined above can panic if one of the published dates cannot be parsed,
@@ -545,7 +545,7 @@
545 return &operation545 return &operation
546}546}
547547
548// The Start Role operation starts a virtual machine. 548// The Start Role operation starts a virtual machine.
549// http://msdn.microsoft.com/en-us/library/windowsazure/jj157189.aspx549// http://msdn.microsoft.com/en-us/library/windowsazure/jj157189.aspx
550var startRoleOperation = newRoleOperation("StartRoleOperation")550var startRoleOperation = newRoleOperation("StartRoleOperation")
551551
552552
=== modified file 'xmlobjects_test.go'
--- xmlobjects_test.go 2013-07-11 03:41:33 +0000
+++ xmlobjects_test.go 2013-07-12 14:49:28 +0000
@@ -147,12 +147,12 @@
147 <PersistentVMRole xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">147 <PersistentVMRole xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
148 <RoleName>%s</RoleName>148 <RoleName>%s</RoleName>
149 <OsVersion>operating-system-version</OsVersion>149 <OsVersion>operating-system-version</OsVersion>
150 <RoleType>PersistentVMRole</RoleType> 150 <RoleType>PersistentVMRole</RoleType>
151 <ConfigurationSets>151 <ConfigurationSets>
152 <ConfigurationSet>152 <ConfigurationSet>
153 <ConfigurationSetType>NetworkConfiguration</ConfigurationSetType> 153 <ConfigurationSetType>NetworkConfiguration</ConfigurationSetType>
154 <InputEndpoints>154 <InputEndpoints>
155 <InputEndpoint> 155 <InputEndpoint>
156 <LoadBalancedEndpointSetName>name-of-load-balanced-endpoint-set</LoadBalancedEndpointSetName>156 <LoadBalancedEndpointSetName>name-of-load-balanced-endpoint-set</LoadBalancedEndpointSetName>
157 <LocalPort>1</LocalPort>157 <LocalPort>1</LocalPort>
158 <Name>name-of-input-endpoint</Name>158 <Name>name-of-input-endpoint</Name>
@@ -160,12 +160,12 @@
160 <LoadBalancerProbe>160 <LoadBalancerProbe>
161 <Path>path-of-probe</Path>161 <Path>path-of-probe</Path>
162 <Port>port-assigned-to-probe</Port>162 <Port>port-assigned-to-probe</Port>
163 <Protocol>protocol-of-input-endpoint</Protocol> 163 <Protocol>protocol-of-input-endpoint</Protocol>
164 </LoadBalancerProbe>164 </LoadBalancerProbe>
165 <Protocol>TCP|UDP</Protocol> 165 <Protocol>TCP|UDP</Protocol>
166 <Vip>virtual-ip-address-of-input-endpoint</Vip>166 <Vip>virtual-ip-address-of-input-endpoint</Vip>
167 </InputEndpoint>167 </InputEndpoint>
168 <InputEndpoint> 168 <InputEndpoint>
169 <LoadBalancedEndpointSetName>name-of-load-balanced-endpoint-set</LoadBalancedEndpointSetName>169 <LoadBalancedEndpointSetName>name-of-load-balanced-endpoint-set</LoadBalancedEndpointSetName>
170 <LocalPort>2</LocalPort>170 <LocalPort>2</LocalPort>
171 <Name>name-of-input-endpoint</Name>171 <Name>name-of-input-endpoint</Name>
@@ -173,9 +173,9 @@
173 <LoadBalancerProbe>173 <LoadBalancerProbe>
174 <Path>path-of-probe</Path>174 <Path>path-of-probe</Path>
175 <Port>port-assigned-to-probe</Port>175 <Port>port-assigned-to-probe</Port>
176 <Protocol>protocol-of-input-endpoint</Protocol> 176 <Protocol>protocol-of-input-endpoint</Protocol>
177 </LoadBalancerProbe>177 </LoadBalancerProbe>
178 <Protocol>TCP|UDP</Protocol> 178 <Protocol>TCP|UDP</Protocol>
179 <Vip>virtual-ip-address-of-input-endpoint</Vip>179 <Vip>virtual-ip-address-of-input-endpoint</Vip>
180 </InputEndpoint>180 </InputEndpoint>
181 </InputEndpoints>181 </InputEndpoints>
@@ -187,22 +187,22 @@
187 <AvailabilitySetName>name-of-availability-set</AvailabilitySetName>187 <AvailabilitySetName>name-of-availability-set</AvailabilitySetName>
188 <DataVirtualHardDisks>188 <DataVirtualHardDisks>
189 <DataVirtualHardDisk>189 <DataVirtualHardDisk>
190 <HostCaching>host-caching-mode-of-data-disk</HostCaching> 190 <HostCaching>host-caching-mode-of-data-disk</HostCaching>
191 <DiskName>new-or-existing-disk-name</DiskName>191 <DiskName>new-or-existing-disk-name</DiskName>
192 <Lun>logical-unit-number-of-data-disk</Lun>192 <Lun>logical-unit-number-of-data-disk</Lun>
193 <LogicalDiskSizeInGB>size-of-data-disk</LogicalDiskSizeInGB> 193 <LogicalDiskSizeInGB>size-of-data-disk</LogicalDiskSizeInGB>
194 <MediaLink>path-to-vhd</MediaLink>194 <MediaLink>path-to-vhd</MediaLink>
195 </DataVirtualHardDisk>195 </DataVirtualHardDisk>
196 </DataVirtualHardDisks>196 </DataVirtualHardDisks>
197 <OSVirtualHardDisk>197 <OSVirtualHardDisk>
198 <HostCaching>host-caching-mode-of-os-disk</HostCaching> 198 <HostCaching>host-caching-mode-of-os-disk</HostCaching>
199 <DiskName>name-of-os-disk</DiskName> 199 <DiskName>name-of-os-disk</DiskName>
200 <MediaLink>path-to-vhd</MediaLink>200 <MediaLink>path-to-vhd</MediaLink>
201 <SourceImageName>image-used-to-create-os-disk</SourceImageName>201 <SourceImageName>image-used-to-create-os-disk</SourceImageName>
202 <OS>operating-system-on-os-disk</OS>202 <OS>operating-system-on-os-disk</OS>
203 </OSVirtualHardDisk> 203 </OSVirtualHardDisk>
204 <RoleSize>size-of-instance</RoleSize>204 <RoleSize>size-of-instance</RoleSize>
205 <DefaultWinRmCertificateThumbprint>winrm-cert-thumbprint</DefaultWinRmCertificateThumbprint> 205 <DefaultWinRmCertificateThumbprint>winrm-cert-thumbprint</DefaultWinRmCertificateThumbprint>
206 </PersistentVMRole>206 </PersistentVMRole>
207 `, rolename)207 `, rolename)
208 return template208 return template
@@ -1099,7 +1099,7 @@
1099 <CopyCompletionTime>copycompletiontime</CopyCompletionTime>1099 <CopyCompletionTime>copycompletiontime</CopyCompletionTime>
1100 <CopyStatusDescription>copydesc</CopyStatusDescription>1100 <CopyStatusDescription>copydesc</CopyStatusDescription>
1101 </Properties>1101 </Properties>
1102 <Metadata> 1102 <Metadata>
1103 <MetaName1>metadataname1</MetaName1>1103 <MetaName1>metadataname1</MetaName1>
1104 <MetaName2>metadataname2</MetaName2>1104 <MetaName2>metadataname2</MetaName2>
1105 </Metadata>1105 </Metadata>

Subscribers

People subscribed via source and target branches

to all changes: