dereference pointer before printing it

[finishes #89575278]

Signed-off-by: Chris Brown <cbrown@pivotal.io>
This commit is contained in:
Alex Suraci
2015-03-03 17:55:09 -08:00
parent 7e122d33ed
commit 4d368b7191
2 changed files with 9 additions and 3 deletions

View File

@@ -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 {

View File

@@ -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() {