Permalink
Browse files

fix err.String() to err.Error()

  • Loading branch information...
mna authored and temoto committed Sep 29, 2012
1 parent f7ffa7c commit 14931d472542e260d9d985d8d8ea178ed3d2ffff
Showing with 10 additions and 9 deletions.
  1. +2 −1 .gitignore
  2. +8 −8 robotstxt_test.go
View
@@ -7,4 +7,5 @@ _cgo_*
_obj
_test
6.out
-
+*.sublime-*
+.DS_Store
View
@@ -170,11 +170,11 @@ const robots_text_003 = "User-Agent: * \nAllow: /"
func TestFromString007(t *testing.T) {
r, err := FromString(robots_text_003, true)
if err != nil {
- t.Fatal(err.String())
+ t.Fatal(err.Error())
}
- allow, err1 := r.TestAgent("/random", "SomeBot")
- if err1 != nil {
- t.Fatal(err1.String())
+ allow, err := r.TestAgent("/random", "SomeBot")
+ if err != nil {
+ t.Fatal(err.Error())
}
if !allow {
t.Fatal("Must allow.")
@@ -186,11 +186,11 @@ const robots_text_004 = "User-Agent: * \nDisallow: "
func TestFromString008(t *testing.T) {
r, err := FromString(robots_text_004, true)
if err != nil {
- t.Fatal(err.String())
+ t.Fatal(err.Error())
}
- allow, err1 := r.TestAgent("/random", "SomeBot")
- if err1 != nil {
- t.Fatal(err1.String())
+ allow, err := r.TestAgent("/random", "SomeBot")
+ if err != nil {
+ t.Fatal(err.Error())
}
if !allow {
t.Fatal("Must allow.")

0 comments on commit 14931d4

Please sign in to comment.