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 |
Related bugs: |
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.
Description of the change
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
1 | === modified file 'example/storage/run.go' |
2 | --- example/storage/run.go 2013-06-25 05:55:14 +0000 |
3 | +++ example/storage/run.go 2013-07-12 14:49:28 +0000 |
4 | @@ -140,31 +140,31 @@ |
5 | invocation parameters: |
6 | |
7 | Show existing storage containers: |
8 | - listcontainers |
9 | + listcontainers |
10 | |
11 | List files in a container: |
12 | -container=<container> list |
13 | |
14 | Set access on a container: |
15 | - -container=<container> -acl <container|blob|private> containeracl |
16 | + -container=<container> -acl <container|blob|private> containeracl |
17 | |
18 | Get a file from a container (it's returned on stdout): |
19 | - -container=<container> -filename=<filename> getblob |
20 | - |
21 | + -container=<container> -filename=<filename> getblob |
22 | + |
23 | Upload a file to a block blob: |
24 | - -container=<container> -filename=<filename> addblock |
25 | + -container=<container> -filename=<filename> addblock |
26 | |
27 | Delete a blob: |
28 | - -container=<container> -filename=<filename> deleteblob |
29 | + -container=<container> -filename=<filename> deleteblob |
30 | |
31 | Create an empty page blob: |
32 | -container=<container> -blobname=<blobname> -size=<bytes> |
33 | - -blobtype="page" putblob |
34 | + -blobtype="page" putblob |
35 | |
36 | Upload a file to a page blob's page. The range parameters must be |
37 | (modulo 512)-(modulo 512 -1), eg: -pagerange=0-511 |
38 | -container=<container> -blobname=<blobname> -pagerange=<N-N> |
39 | - -filename=<local file> putpage |
40 | + -filename=<local file> putpage |
41 | `) |
42 | } |
43 | |
44 | |
45 | === modified file 'httperror.go' |
46 | --- httperror.go 2013-07-11 10:48:03 +0000 |
47 | +++ httperror.go 2013-07-12 14:49:28 +0000 |
48 | @@ -95,7 +95,7 @@ |
49 | // the given message plus the error string from the original error. |
50 | // It preserves the value of the error types it knows about (currently only |
51 | // ServerError). |
52 | -// |
53 | +// |
54 | // The main purpose of this method is to offer a unified way to |
55 | // extend the information present in errors while still not losing the |
56 | // additioning information present on specific errors gwacl knows out to extend |
57 | |
58 | === modified file 'management_base.go' |
59 | --- management_base.go 2013-07-12 04:45:34 +0000 |
60 | +++ management_base.go 2013-07-12 14:49:28 +0000 |
61 | @@ -107,7 +107,7 @@ |
62 | } |
63 | |
64 | // ListHostedServices loads a list of HostedServiceDescriptor objects from the |
65 | -// Azure management API. |
66 | +// Azure management API. |
67 | // HostedServiceDescriptor objects contains a small subset of the fields present in |
68 | // HostedService objects. |
69 | // See http://msdn.microsoft.com/en-us/library/windowsazure/ee460781.aspx |
70 | @@ -182,7 +182,7 @@ |
71 | // DeleteHostedService deletes the named hosted service. |
72 | // See http://msdn.microsoft.com/en-us/library/windowsazure/gg441305.aspx |
73 | func (api *ManagementAPI) DeleteHostedService(serviceName string) error { |
74 | - response, err := api.session.delete("services/hostedservices/" + serviceName, "2010-10-28") |
75 | + response, err := api.session.delete("services/hostedservices/"+serviceName, "2010-10-28") |
76 | if err != nil { |
77 | return err |
78 | } |
79 | @@ -266,7 +266,7 @@ |
80 | // DeleteStorageAccount deletes a storage account. |
81 | // See http://msdn.microsoft.com/en-us/library/windowsazure/hh264517.aspx |
82 | func (api *ManagementAPI) DeleteStorageAccount(storageAccountName string) error { |
83 | - response, err := api.session.delete("services/storageservices/" + storageAccountName, "2011-06-01") |
84 | + response, err := api.session.delete("services/storageservices/"+storageAccountName, "2011-06-01") |
85 | if err != nil { |
86 | return err |
87 | } |
88 | @@ -303,7 +303,7 @@ |
89 | |
90 | func (api *ManagementAPI) _DeleteDisk(diskName string) error { |
91 | response, err := api.session.delete( |
92 | - "services/disks/" + diskName, "2012-08-01") |
93 | + "services/disks/"+diskName, "2012-08-01") |
94 | if err != nil { |
95 | return err |
96 | } |
97 | |
98 | === modified file 'names.go' |
99 | --- names.go 2013-07-11 14:06:24 +0000 |
100 | +++ names.go 2013-07-12 14:49:28 +0000 |
101 | @@ -95,7 +95,7 @@ |
102 | // the same sequence! |
103 | func MakeRandomDiskName(prefix string) string { |
104 | // Azure documentation does not say what the maximum size of a disk name |
105 | - // is. Testing indicate that 50 works. |
106 | + // is. Testing indicate that 50 works. |
107 | return makeRandomIdentifier(prefix, 50) |
108 | } |
109 | |
110 | @@ -110,7 +110,7 @@ |
111 | // the same sequence! |
112 | func MakeRandomRoleName(prefix string) string { |
113 | // Azure documentation does not say what the maximum size of a role name |
114 | - // is. Testing indicate that 50 works. |
115 | + // is. Testing indicate that 50 works. |
116 | return makeRandomIdentifier(prefix, 50) |
117 | } |
118 | |
119 | |
120 | === modified file 'poller.go' |
121 | --- poller.go 2013-07-12 03:23:57 +0000 |
122 | +++ poller.go 2013-07-12 14:49:28 +0000 |
123 | @@ -11,7 +11,7 @@ |
124 | // Generic poller interface/methods. |
125 | |
126 | // A poller exposes two methods to query a remote server and decide when |
127 | -// the response given by the server means that the polling is finished. |
128 | +// the response given by the server means that the polling is finished. |
129 | type poller interface { |
130 | poll() (*x509Response, error) |
131 | isDone(*x509Response, error) (bool, error) |
132 | |
133 | === modified file 'poller_test.go' |
134 | --- poller_test.go 2013-07-12 04:22:16 +0000 |
135 | +++ poller_test.go 2013-07-12 14:49:28 +0000 |
136 | @@ -184,7 +184,7 @@ |
137 | // it's probably worth it to thoroughly test performOperationPolling(). |
138 | |
139 | // Fake 2 responses in sequence: a 'InProgress' response and then a |
140 | - // 'Succeeded' response. |
141 | + // 'Succeeded' response. |
142 | firstResponse := DispatcherResponse{ |
143 | response: &x509Response{ |
144 | Body: []byte(fmt.Sprintf(operationXMLTemplate, "InProgress")), |
145 | |
146 | === modified file 'x509dispatcher.go' |
147 | --- x509dispatcher.go 2013-07-12 02:52:34 +0000 |
148 | +++ x509dispatcher.go 2013-07-12 14:49:28 +0000 |
149 | @@ -176,7 +176,7 @@ |
150 | return response, nil |
151 | } |
152 | |
153 | -// The maximum number of redirection-followings allowed. |
154 | +// The maximum number of redirection-followings allowed. |
155 | var _CURL_MAX_REDIRECTS = 10 |
156 | |
157 | // makeCurlRequest produces a curl.CURL representing the request. |
158 | |
159 | === modified file 'x509dispatcher_test.go' |
160 | --- x509dispatcher_test.go 2013-07-12 04:25:31 +0000 |
161 | +++ x509dispatcher_test.go 2013-07-12 14:49:28 +0000 |
162 | @@ -79,7 +79,7 @@ |
163 | c.Assert(err, IsNil) |
164 | path := "/foo/bar" |
165 | version := "test-version" |
166 | - request := newX509RequestGET(server.URL + path, version) |
167 | + request := newX509RequestGET(server.URL+path, version) |
168 | |
169 | response, err := performX509CurlRequest(session, request) |
170 | c.Assert(err, IsNil) |
171 | @@ -104,7 +104,7 @@ |
172 | c.Assert(err, IsNil) |
173 | path := "/foo/bar" |
174 | version := "test-version" |
175 | - request := newX509RequestGET(server.URL + path, version) |
176 | + request := newX509RequestGET(server.URL+path, version) |
177 | |
178 | _, err = performX509CurlRequest(session, request) |
179 | c.Check(err, ErrorMatches, ".*Number of redirects hit maximum amount.*") |
180 | @@ -168,7 +168,7 @@ |
181 | c.Assert(err, IsNil) |
182 | path := "/foo/bar" |
183 | version := "test-version" |
184 | - request := newX509RequestDELETE(server.URL + path, version) |
185 | + request := newX509RequestDELETE(server.URL+path, version) |
186 | |
187 | response, err := performX509CurlRequest(session, request) |
188 | c.Assert(err, IsNil) |
189 | @@ -220,7 +220,7 @@ |
190 | session, err := newX509Session("subscriptionid", "cert.pem") |
191 | c.Assert(err, IsNil) |
192 | path := "/foo/bar" |
193 | - request := newX509RequestGET(server.URL + path, "testversion") |
194 | + request := newX509RequestGET(server.URL+path, "testversion") |
195 | |
196 | response, err := performX509CurlRequest(session, request) |
197 | c.Assert(err, IsNil) |
198 | |
199 | === modified file 'x509session_test.go' |
200 | --- x509session_test.go 2013-07-12 04:22:16 +0000 |
201 | +++ x509session_test.go 2013-07-12 14:49:28 +0000 |
202 | @@ -193,7 +193,7 @@ |
203 | rigRecordingDispatcher(&recordedRequests) |
204 | |
205 | version := "test-version" |
206 | - receivedResponse, err := session.get(uri,version) |
207 | + receivedResponse, err := session.get(uri, version) |
208 | c.Assert(err, IsNil) |
209 | |
210 | c.Assert(len(recordedRequests), Equals, 1) |
211 | |
212 | === modified file 'xmlobjects.go' |
213 | --- xmlobjects.go 2013-07-12 12:58:03 +0000 |
214 | +++ xmlobjects.go 2013-07-12 14:49:28 +0000 |
215 | @@ -157,7 +157,7 @@ |
216 | |
217 | // GetLatestUbuntuImage returns the most recent released available OSImage, |
218 | // for the given release name and location. The 'releaseName' parameter is |
219 | -// the Ubuntu version number present in the 'ImageFamily' tag present in |
220 | +// the Ubuntu version number present in the 'ImageFamily' tag present in |
221 | // Azure's representation of an OS Image (e.g. '12.04', '12.10'). |
222 | func (images *Images) GetLatestUbuntuImage(releaseName string, location string) (image *OSImage, err error) { |
223 | // The Less method defined above can panic if one of the published dates cannot be parsed, |
224 | @@ -545,7 +545,7 @@ |
225 | return &operation |
226 | } |
227 | |
228 | -// The Start Role operation starts a virtual machine. |
229 | +// The Start Role operation starts a virtual machine. |
230 | // http://msdn.microsoft.com/en-us/library/windowsazure/jj157189.aspx |
231 | var startRoleOperation = newRoleOperation("StartRoleOperation") |
232 | |
233 | |
234 | === modified file 'xmlobjects_test.go' |
235 | --- xmlobjects_test.go 2013-07-11 03:41:33 +0000 |
236 | +++ xmlobjects_test.go 2013-07-12 14:49:28 +0000 |
237 | @@ -147,12 +147,12 @@ |
238 | <PersistentVMRole xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance"> |
239 | <RoleName>%s</RoleName> |
240 | <OsVersion>operating-system-version</OsVersion> |
241 | - <RoleType>PersistentVMRole</RoleType> |
242 | + <RoleType>PersistentVMRole</RoleType> |
243 | <ConfigurationSets> |
244 | <ConfigurationSet> |
245 | - <ConfigurationSetType>NetworkConfiguration</ConfigurationSetType> |
246 | + <ConfigurationSetType>NetworkConfiguration</ConfigurationSetType> |
247 | <InputEndpoints> |
248 | - <InputEndpoint> |
249 | + <InputEndpoint> |
250 | <LoadBalancedEndpointSetName>name-of-load-balanced-endpoint-set</LoadBalancedEndpointSetName> |
251 | <LocalPort>1</LocalPort> |
252 | <Name>name-of-input-endpoint</Name> |
253 | @@ -160,12 +160,12 @@ |
254 | <LoadBalancerProbe> |
255 | <Path>path-of-probe</Path> |
256 | <Port>port-assigned-to-probe</Port> |
257 | - <Protocol>protocol-of-input-endpoint</Protocol> |
258 | + <Protocol>protocol-of-input-endpoint</Protocol> |
259 | </LoadBalancerProbe> |
260 | - <Protocol>TCP|UDP</Protocol> |
261 | + <Protocol>TCP|UDP</Protocol> |
262 | <Vip>virtual-ip-address-of-input-endpoint</Vip> |
263 | </InputEndpoint> |
264 | - <InputEndpoint> |
265 | + <InputEndpoint> |
266 | <LoadBalancedEndpointSetName>name-of-load-balanced-endpoint-set</LoadBalancedEndpointSetName> |
267 | <LocalPort>2</LocalPort> |
268 | <Name>name-of-input-endpoint</Name> |
269 | @@ -173,9 +173,9 @@ |
270 | <LoadBalancerProbe> |
271 | <Path>path-of-probe</Path> |
272 | <Port>port-assigned-to-probe</Port> |
273 | - <Protocol>protocol-of-input-endpoint</Protocol> |
274 | + <Protocol>protocol-of-input-endpoint</Protocol> |
275 | </LoadBalancerProbe> |
276 | - <Protocol>TCP|UDP</Protocol> |
277 | + <Protocol>TCP|UDP</Protocol> |
278 | <Vip>virtual-ip-address-of-input-endpoint</Vip> |
279 | </InputEndpoint> |
280 | </InputEndpoints> |
281 | @@ -187,22 +187,22 @@ |
282 | <AvailabilitySetName>name-of-availability-set</AvailabilitySetName> |
283 | <DataVirtualHardDisks> |
284 | <DataVirtualHardDisk> |
285 | - <HostCaching>host-caching-mode-of-data-disk</HostCaching> |
286 | + <HostCaching>host-caching-mode-of-data-disk</HostCaching> |
287 | <DiskName>new-or-existing-disk-name</DiskName> |
288 | <Lun>logical-unit-number-of-data-disk</Lun> |
289 | - <LogicalDiskSizeInGB>size-of-data-disk</LogicalDiskSizeInGB> |
290 | + <LogicalDiskSizeInGB>size-of-data-disk</LogicalDiskSizeInGB> |
291 | <MediaLink>path-to-vhd</MediaLink> |
292 | </DataVirtualHardDisk> |
293 | </DataVirtualHardDisks> |
294 | <OSVirtualHardDisk> |
295 | - <HostCaching>host-caching-mode-of-os-disk</HostCaching> |
296 | - <DiskName>name-of-os-disk</DiskName> |
297 | + <HostCaching>host-caching-mode-of-os-disk</HostCaching> |
298 | + <DiskName>name-of-os-disk</DiskName> |
299 | <MediaLink>path-to-vhd</MediaLink> |
300 | <SourceImageName>image-used-to-create-os-disk</SourceImageName> |
301 | <OS>operating-system-on-os-disk</OS> |
302 | - </OSVirtualHardDisk> |
303 | + </OSVirtualHardDisk> |
304 | <RoleSize>size-of-instance</RoleSize> |
305 | - <DefaultWinRmCertificateThumbprint>winrm-cert-thumbprint</DefaultWinRmCertificateThumbprint> |
306 | + <DefaultWinRmCertificateThumbprint>winrm-cert-thumbprint</DefaultWinRmCertificateThumbprint> |
307 | </PersistentVMRole> |
308 | `, rolename) |
309 | return template |
310 | @@ -1099,7 +1099,7 @@ |
311 | <CopyCompletionTime>copycompletiontime</CopyCompletionTime> |
312 | <CopyStatusDescription>copydesc</CopyStatusDescription> |
313 | </Properties> |
314 | - <Metadata> |
315 | + <Metadata> |
316 | <MetaName1>metadataname1</MetaName1> |
317 | <MetaName2>metadataname2</MetaName2> |
318 | </Metadata> |