Commits

Jason Moiron committed f5daa76

switch to log, remove explicit interface, remove outdated comments

Comments (0)

Files changed (2)

 import (
 	"fmt"
 	"io/ioutil"
+	"log"
 	"net/http"
 	"net/url"
 	"strings"
 
 	if len(cachefile) > 0 && exists(cachefile) && EnableHttpCache {
 		if opts.Verbose {
-			fmt.Printf("Reading in cached body for %s (in %s)\n", url, cachefile)
+			log.Printf("Reading in cached body for %s (in %s)\n", url, cachefile)
 		}
 		body, _ = ioutil.ReadFile(cachefile)
 	} else {
 		}
 
 		if len(cachefile) > 0 {
-			// this is for debugging only (to prevent hammering sites)
-			// disable with some kind of flag or remove from code before shipping
 			err = ioutil.WriteFile(cachefile, body, 0655)
 			if err != nil {
 				fmt.Printf("Error writing out cachefile %s\n", cachefile)
 // A node wrapper, in order to provide a similar interface in the future
 // possibly without gokogiri
 type Node struct {
-	Selectable
 	doc  *html.HtmlDocument
 	ptr  unsafe.Pointer
 	node xml.Node
 // A Document wrapper, which can be Freed and Selected, and exposes
 // the root as a Node object with the Root field
 type Document struct {
-	Selectable
 	doc    *html.HtmlDocument
 	docptr unsafe.Pointer
 	Root   Node