From 040cf98281f1e667851b9fef8165d8ec70b1a0da Mon Sep 17 00:00:00 2001 From: Martin Angers Date: Wed, 5 Nov 2014 20:30:33 -0500 Subject: [PATCH 1/2] change paths to golang.org/x/, fails to build because cascadia has to switch too --- array.go | 2 +- expand.go | 2 +- filter.go | 2 +- iteration_test.go | 2 +- property.go | 2 +- query.go | 2 +- traversal.go | 2 +- type.go | 3 ++- type_test.go | 2 +- utilities.go | 2 +- 10 files changed, 11 insertions(+), 10 deletions(-) diff --git a/array.go b/array.go index c9899b4..c32b940 100644 --- a/array.go +++ b/array.go @@ -1,7 +1,7 @@ package goquery import ( - "code.google.com/p/go.net/html" + "golang.org/x/net/html" ) // First reduces the set of matched elements to the first in the set. diff --git a/expand.go b/expand.go index 96075c9..b4421a3 100644 --- a/expand.go +++ b/expand.go @@ -1,7 +1,7 @@ package goquery import ( - "code.google.com/p/go.net/html" + "golang.org/x/net/html" ) // Add adds the selector string's matching nodes to those in the current diff --git a/filter.go b/filter.go index c79cafe..941b8c2 100644 --- a/filter.go +++ b/filter.go @@ -2,7 +2,7 @@ package goquery import ( "code.google.com/p/cascadia" - "code.google.com/p/go.net/html" + "golang.org/x/net/html" ) // Filter reduces the set of matched elements to those that match the selector string. diff --git a/iteration_test.go b/iteration_test.go index fc18855..b084fe8 100644 --- a/iteration_test.go +++ b/iteration_test.go @@ -3,7 +3,7 @@ package goquery import ( "testing" - "code.google.com/p/go.net/html" + "golang.org/x/net/html" ) func TestEach(t *testing.T) { diff --git a/property.go b/property.go index 4794404..2564edc 100644 --- a/property.go +++ b/property.go @@ -3,7 +3,7 @@ package goquery import ( "bytes" - "code.google.com/p/go.net/html" + "golang.org/x/net/html" ) // Attr gets the specified attribute's value for the first element in the diff --git a/query.go b/query.go index 8d079a0..690f2f1 100644 --- a/query.go +++ b/query.go @@ -5,7 +5,7 @@ import ( "strings" "code.google.com/p/cascadia" - "code.google.com/p/go.net/html" + "golang.org/x/net/html" ) var rxClassTrim = regexp.MustCompile("[\t\r\n]") diff --git a/traversal.go b/traversal.go index 8fbeddf..20cf637 100644 --- a/traversal.go +++ b/traversal.go @@ -2,7 +2,7 @@ package goquery import ( "code.google.com/p/cascadia" - "code.google.com/p/go.net/html" + "golang.org/x/net/html" ) type siblingType int diff --git a/type.go b/type.go index e253a75..d093725 100644 --- a/type.go +++ b/type.go @@ -1,11 +1,12 @@ package goquery import ( - "code.google.com/p/go.net/html" "errors" "io" "net/http" "net/url" + + "golang.org/x/net/html" ) // Document represents an HTML document to be manipulated. Unlike jQuery, which diff --git a/type_test.go b/type_test.go index 410a095..57f3891 100644 --- a/type_test.go +++ b/type_test.go @@ -6,7 +6,7 @@ import ( "os" "testing" - "code.google.com/p/go.net/html" + "golang.org/x/net/html" ) // Test helper functions and members diff --git a/utilities.go b/utilities.go index c1b6f26..aa509e6 100644 --- a/utilities.go +++ b/utilities.go @@ -1,7 +1,7 @@ package goquery import ( - "code.google.com/p/go.net/html" + "golang.org/x/net/html" ) func getChildren(n *html.Node) (result []*html.Node) { From 98316c249dbd0005ed8cd0ef955e5b65d919ddfe Mon Sep 17 00:00:00 2001 From: Martin Angers Date: Thu, 6 Nov 2014 16:46:53 -0500 Subject: [PATCH 2/2] changelog --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c88f49a..d1f2077 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ Please note that because of the net/html dependency, goquery requires Go1.1+. **Note that goquery's API is now stable, and will not break.** +* **2014-11-06** : Change import paths of net/html to golang.org/x/net/html (see https://groups.google.com/forum/#!topic/golang-nuts/eD8dh3T9yyA). Make sure to update your code to use the new import path too when you call goquery with `html.Node`s. * **v0.3.2** : Add `NewDocumentFromReader()` (thanks jweir) which allows creating a goquery document from an io.Reader. * **v0.3.1** : Add `NewDocumentFromResponse()` (thanks assassingj) which allows creating a goquery document from an http response. * **v0.3.0** : Add `EachWithBreak()` which allows to break out of an `Each()` loop by returning false. This function was added instead of changing the existing `Each()` to avoid breaking compatibility.