Kiln » gitkiln Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in master

properly strip quotes off security token

Changeset 15afcda19cb4

Parent 67064c1e930b

by Profile picture of User 12Benjamin Pollack <benjamin@fogcreek.com>

Changes to one file · Browse files at 15afcda19cb4 Showing diff from parent 67064c1e930b Diff from another changeset...

Change 1 of 1 Show Entire File kiln/​kiln.go Stacked
 
85
86
87
88
89
 
90
91
92
93
94
 
 
 
95
96
97
 
85
86
87
 
 
88
89
90
91
92
 
93
94
95
96
97
98
@@ -85,13 +85,14 @@
  return fmt.Errorf("unable to contact Kiln: %v\n", err)   }   var errors map[string][]KilnError - err = json.Unmarshal(resp, &errors) - if err == nil { + if err = json.Unmarshal(resp, &errors); err == nil {   if err, _ := errors["errors"]; len(err) > 0 {   return fmt.Errorf("failed: %v\n", err[0].Description)   }   } - k.credentials.Token = string(resp) + if err = json.Unmarshal(resp, &k.credentials.Token); err != nil { + return fmt.Errorf("failed to parse token: %v", err) + }   return nil  }