Merge pull request #1494 from pulumi/LinterAppeasement

Appease linters.
This commit is contained in:
Pat Gavlin 2018-06-11 14:52:42 -07:00 committed by GitHub
commit f06b50d428
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View file

@ -959,8 +959,9 @@ func addNextFileToZIP(r ArchiveReader, zw *zip.Writer) error {
Method: zip.Deflate, Method: zip.Deflate,
} }
// Set a nonzero -- but constant -- modification time. // Set a nonzero -- but constant -- modification time. Otherwise, some agents (e.g. Azure websites) can't extract the
// Otherwise, some agents (e.g. Azure websites) can't extract the resulting archive. // resulting archive. We use `SetModTime` for go1.9 compatibility.
// nolint: megacheck
fh.SetModTime(time.Unix(0, 0)) fh.SetModTime(time.Unix(0, 0))
fw, err := zw.CreateHeader(fh) fw, err := zw.CreateHeader(fh)

View file

@ -202,13 +202,13 @@ func (ctx *Context) ReadResource(
} }
// No matter the outcome, make sure all promises are resolved. // No matter the outcome, make sure all promises are resolved.
var urn, id string var urn, resID string
var props *structpb.Struct var props *structpb.Struct
if resp != nil { if resp != nil {
urn, id = resp.Urn, string(id) urn, resID = resp.Urn, string(id)
props = resp.Properties props = resp.Properties
} }
op.complete(err, urn, id, props) op.complete(err, urn, resID, props)
// Signal the completion of this RPC and notify any potential awaiters. // Signal the completion of this RPC and notify any potential awaiters.
ctx.endRPC() ctx.endRPC()
@ -267,13 +267,13 @@ func (ctx *Context) RegisterResource(
} }
// No matter the outcome, make sure all promises are resolved. // No matter the outcome, make sure all promises are resolved.
var urn, id string var urn, resID string
var props *structpb.Struct var props *structpb.Struct
if resp != nil { if resp != nil {
urn, id = resp.Urn, string(id) urn, resID = resp.Urn, resp.Id
props = resp.Object props = resp.Object
} }
op.complete(err, urn, id, props) op.complete(err, urn, resID, props)
// Signal the completion of this RPC and notify any potential awaiters. // Signal the completion of this RPC and notify any potential awaiters.
ctx.endRPC() ctx.endRPC()