mirror of
https://salsa.debian.org/mdosch/feed-to-muc.git
synced 2024-12-22 21:05:25 +01:00
[golangci-lint] Added error handling for h.Write.
This commit is contained in:
parent
8ac7a60770
commit
c6b881a883
1 changed files with 4 additions and 1 deletions
|
@ -70,7 +70,10 @@ func getArticles(feedURL string, max int, noExcerpt bool, filter []string) (stri
|
|||
// Create a hash as identifier for the feed.
|
||||
// The identifier will be used as filename for caching the update time.
|
||||
h := fnv.New32a()
|
||||
h.Write([]byte(feedURL))
|
||||
_, err := h.Write([]byte(feedURL))
|
||||
if err != nil {
|
||||
log.Fatal("Error: Can't create hash for", feedURL + ":", err)
|
||||
}
|
||||
if _, err := os.Stat(cachePath); os.IsNotExist(err) {
|
||||
err = os.MkdirAll(cachePath, 0700)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in a new issue