Pārlūkot izejas kodu

Use better error message when post isn't found

tags/v0.1
Matt Baer pirms 9 gadiem
vecāks
revīzija
d820eb8f0c
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. +2
    -0
      cli.go

+ 2
- 0
cli.go Parādīt failu

@@ -214,6 +214,8 @@ func DoFetch(friendlyId string, tor bool) {
content, err := ioutil.ReadAll(resp.Body)
check(err)
fmt.Printf("%s\n", string(content))
} else if resp.StatusCode == http.StatusNotFound {
fmt.Printf("Post not found.\n")
} else {
fmt.Printf("Problem getting post: %s\n", resp.Status)
}


Notiek ielāde…
Atcelt
Saglabāt