From 4d368b719105676ce082579997a326da30d05b87 Mon Sep 17 00:00:00 2001 From: Alex Suraci Date: Tue, 3 Mar 2015 17:55:09 -0800 Subject: [PATCH] dereference pointer before printing it [finishes #89575278] Signed-off-by: Chris Brown --- out_command.go | 2 +- out_command_test.go | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/out_command.go b/out_command.go index b1381b2..e9f4038 100644 --- a/out_command.go +++ b/out_command.go @@ -68,7 +68,7 @@ func (c *OutCommand) Run(sourceDir string, request OutRequest) (OutResponse, err existingRelease.Body = github.String(body) for _, asset := range existingRelease.Assets { - fmt.Fprintf(c.writer, "clearing existing asset: %s\n", asset.Name) + fmt.Fprintf(c.writer, "clearing existing asset: %s\n", *asset.Name) err := c.github.DeleteReleaseAsset(asset) if err != nil { diff --git a/out_command_test.go b/out_command_test.go index 63b8dad..76e075a 100644 --- a/out_command_test.go +++ b/out_command_test.go @@ -64,8 +64,14 @@ var _ = Describe("Out Command", func() { Context("when the release has already been created", func() { existingAssets := []github.ReleaseAsset{ - {ID: github.Int(456789)}, - {ID: github.Int(3450798)}, + { + ID: github.Int(456789), + Name: github.String("unicorns.txt"), + }, + { + ID: github.Int(3450798), + Name: github.String("rainbows.txt"), + }, } BeforeEach(func() {