Skip to content

Commit 4b70504

Browse files
authored
Merge pull request #87 from skx/86-minor-fixes
86 minor fixes
2 parents 4db1fa4 + f4b1858 commit 4b70504

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

configfile/FUZZING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Fuzz-Testing
22

3-
The upcoming 1.18 release of the golang compiler/toolset has integrated
4-
support for fuzz-testing.
3+
The 1.18 release of the golang compiler/toolset has integrated support for
4+
fuzz-testing.
55

66
Fuzz-testing is basically magical and involves generating new inputs "randomly"
77
and running test-cases with those inputs.
@@ -31,4 +31,4 @@ our configuration-file parser like so:
3131
ok github.com/skx/rss2email/configfile 301.135s
3232

3333

34-
You'll note that I've added `-parellel=1` to the test, because otherwise my desktop system becomes unresponsive while the testing is going on.
34+
You'll note that I've added `-parallel=1` to the test, because otherwise my desktop system becomes unresponsive while the testing is going on.

processor/processor.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ func (p *Processor) ProcessFeeds(recipients []string) []error {
110110
// a bucket for each Feed URL, and then store the
111111
// URLs we've seen with a random value.
112112
//
113-
err := p.dbHandle.Update(func(tx *bbolt.Tx) error {
114-
_, err := tx.CreateBucketIfNotExists([]byte(entry.URL))
115-
if err != nil {
113+
err = p.dbHandle.Update(func(tx *bbolt.Tx) error {
114+
_, err2 := tx.CreateBucketIfNotExists([]byte(entry.URL))
115+
if err2 != nil {
116116
return fmt.Errorf("create bucket failed: %s", err)
117117
}
118118
return nil
@@ -143,8 +143,8 @@ func (p *Processor) ProcessFeeds(recipients []string) []error {
143143
// will apply rate-limiting if we make too many consecutive
144144
// requests in a short period of time.
145145
host := ""
146-
u, err := url.Parse(entry.URL)
147-
if err == nil {
146+
u, err2 := url.Parse(entry.URL)
147+
if err2 == nil {
148148
host = u.Host
149149
}
150150

0 commit comments

Comments
 (0)