Skip to content

Commit

Permalink
Formatting fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Cummer committed Jun 29, 2018
1 parent bbb5d9a commit 5de4dd6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
5 changes: 2 additions & 3 deletions cfg/config_files.go
Expand Up @@ -81,11 +81,10 @@ func CreateConfigFile() {
}

// If the file is empty, write to it
file, err := os.Stat(filePath)
file, _ := os.Stat(filePath)

if file.Size() == 0 {
err = ioutil.WriteFile(filePath, []byte(simpleConfig), 0644)
if err != nil {
if ioutil.WriteFile(filePath, []byte(simpleConfig), 0644) != nil {
panic(err)
}
}
Expand Down
12 changes: 6 additions & 6 deletions cryptoexchanges/blockfolio/widget.go
Expand Up @@ -73,15 +73,15 @@ func contentFrom(positions *AllPositionsResponse) string {
const magic = "edtopjhgn2345piuty89whqejfiobh89-2q453"

type Position struct {
Coin string `json:coin`
LastPriceFiat float32 `json:lastPriceFiat`
TwentyFourHourPercentChangeFiat float32 `json:twentyFourHourPercentChangeFiat`
Quantity float32 `json:quantity`
HoldingValueFiat float32 `json:holdingValueFiat`
Coin string `json:"coin"`
LastPriceFiat float32 `json:"lastPriceFiat"`
TwentyFourHourPercentChangeFiat float32 `json:"twentyFourHourPercentChangeFiat"`
Quantity float32 `json:"quantity"`
HoldingValueFiat float32 `json:"holdingValueFiat"`
}

type AllPositionsResponse struct {
PositionList []Position `json:positionList`
PositionList []Position `json:"positionList"`
}

func MakeApiRequest(token string, method string) ([]byte, error) {
Expand Down
3 changes: 1 addition & 2 deletions jenkins/client.go
Expand Up @@ -23,7 +23,7 @@ func Create(jenkinsURL string, username string, apiKey string) (*View, error) {
}
jenkinsAPIURL := parsedJenkinsURL.ResolveReference(parsedSuffix)

req, err := http.NewRequest("GET", jenkinsAPIURL.String(), nil)
req, _ := http.NewRequest("GET", jenkinsAPIURL.String(), nil)
req.SetBasicAuth(username, apiKey)

httpClient := &http.Client{}
Expand All @@ -45,7 +45,6 @@ func ensureLastSlash(URL string) string {

/* -------------------- Unexported Functions -------------------- */


func parseJson(obj interface{}, text io.Reader) {
jsonStream, err := ioutil.ReadAll(text)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion jenkins/view.go
Expand Up @@ -6,5 +6,5 @@ type View struct {
Jobs []Job `json:"jobs"`
Name string `json:"name"`
Property []string `json:"property"`
url string `json:"url"`
Url string `json:"url"`
}

0 comments on commit 5de4dd6

Please sign in to comment.