Skip to content

Commit

Permalink
remove import comments
Browse files Browse the repository at this point in the history
The import comments prevent the Go module compatibility code
from working, because they stop the module being imported
as its correct import path, `github.com/tdewolff/parse/v2`.

The `go.mod` file supercedes the need for import comments now anyway.
  • Loading branch information
rogpeppe committed Jul 15, 2019
1 parent b8d8be7 commit a24711f
Show file tree
Hide file tree
Showing 40 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion buffer/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The `Reader` and `Writer` types implement the `io.Reader` and `io.Writer` respec
The `Lexer` type is useful for building lexers because it keeps track of the start and end position of a byte selection, and shifts the bytes whenever a valid token is found.
The `StreamLexer` does the same, but keeps a buffer pool so that it reads a limited amount at a time, allowing to parse from streaming sources.
*/
package buffer // import "github.com/tdewolff/parse/buffer"
package buffer

// defaultBufSize specifies the default initial length of internal buffers.
var defaultBufSize = 4096
Expand Down
2 changes: 1 addition & 1 deletion buffer/lexer.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package buffer // import "github.com/tdewolff/parse/buffer"
package buffer

import (
"io"
Expand Down
2 changes: 1 addition & 1 deletion buffer/lexer_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package buffer // import "github.com/tdewolff/parse/buffer"
package buffer

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion buffer/reader.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package buffer // import "github.com/tdewolff/parse/buffer"
package buffer

import "io"

Expand Down
2 changes: 1 addition & 1 deletion buffer/reader_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package buffer // import "github.com/tdewolff/parse/buffer"
package buffer

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion buffer/streamlexer.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package buffer // import "github.com/tdewolff/parse/buffer"
package buffer

import (
"io"
Expand Down
2 changes: 1 addition & 1 deletion buffer/streamlexer_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package buffer // import "github.com/tdewolff/parse/buffer"
package buffer

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion buffer/writer.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package buffer // import "github.com/tdewolff/parse/buffer"
package buffer

// Writer implements an io.Writer over a byte slice.
type Writer struct {
Expand Down
2 changes: 1 addition & 1 deletion buffer/writer_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package buffer // import "github.com/tdewolff/parse/buffer"
package buffer

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion common.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package parse contains a collection of parsers for various formats in its subpackages.
package parse // import "github.com/tdewolff/parse"
package parse

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion common_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package parse // import "github.com/tdewolff/parse"
package parse

import (
"encoding/base64"
Expand Down
2 changes: 1 addition & 1 deletion css/hash_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package css // import "github.com/tdewolff/parse/css"
package css

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion css/lex.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package css is a CSS3 lexer and parser following the specifications at http://www.w3.org/TR/css-syntax-3/.
package css // import "github.com/tdewolff/parse/css"
package css

// TODO: \uFFFD replacement character for NULL bytes in strings for example, or atleast don't end the string early

Expand Down
2 changes: 1 addition & 1 deletion css/lex_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package css // import "github.com/tdewolff/parse/css"
package css

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion css/parse.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package css // import "github.com/tdewolff/parse/css"
package css

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion css/parse_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package css // import "github.com/tdewolff/parse/css"
package css

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion css/util.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package css // import "github.com/tdewolff/parse/css"
package css

import "github.com/tdewolff/parse/v2/buffer"

Expand Down
2 changes: 1 addition & 1 deletion css/util_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package css // import "github.com/tdewolff/parse/css"
package css

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion html/hash_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package html // import "github.com/tdewolff/parse/html"
package html

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion html/lex.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package html is an HTML5 lexer following the specifications at http://www.w3.org/TR/html5/syntax.html.
package html // import "github.com/tdewolff/parse/html"
package html

import (
"io"
Expand Down
2 changes: 1 addition & 1 deletion html/lex_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package html // import "github.com/tdewolff/parse/html"
package html

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion html/util.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package html // import "github.com/tdewolff/parse/html"
package html

import "github.com/tdewolff/parse/v2"

Expand Down
2 changes: 1 addition & 1 deletion html/util_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package html // import "github.com/tdewolff/parse/html"
package html

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion js/hash_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package js // import "github.com/tdewolff/parse/js"
package js

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion js/lex.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package js is an ECMAScript5.1 lexer following the specifications at http://www.ecma-international.org/ecma-262/5.1/.
package js // import "github.com/tdewolff/parse/js"
package js

import (
"io"
Expand Down
2 changes: 1 addition & 1 deletion js/lex_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package js // import "github.com/tdewolff/parse/js"
package js

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion json/parse.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package json is a JSON parser following the specifications at http://json.org/.
package json // import "github.com/tdewolff/parse/json"
package json

import (
"io"
Expand Down
2 changes: 1 addition & 1 deletion json/parse_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package json // import "github.com/tdewolff/parse/json"
package json

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion strconv/float.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package strconv // import "github.com/tdewolff/parse/strconv"
package strconv

import "math"

Expand Down
2 changes: 1 addition & 1 deletion strconv/float_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package strconv // import "github.com/tdewolff/parse/strconv"
package strconv

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion strconv/int.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package strconv // import "github.com/tdewolff/parse/strconv"
package strconv

import (
"math"
Expand Down
2 changes: 1 addition & 1 deletion strconv/int_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package strconv // import "github.com/tdewolff/parse/strconv"
package strconv

import (
"math"
Expand Down
2 changes: 1 addition & 1 deletion strconv/price_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package strconv // import "github.com/tdewolff/parse/strconv"
package strconv

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion svg/hash_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package svg // import "github.com/tdewolff/parse/svg"
package svg

import (
"testing"
Expand Down
2 changes: 1 addition & 1 deletion util.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package parse // import "github.com/tdewolff/parse"
package parse

// Copy returns a copy of the given byte slice.
func Copy(src []byte) (dst []byte) {
Expand Down
2 changes: 1 addition & 1 deletion util_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package parse // import "github.com/tdewolff/parse"
package parse

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion xml/lex.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Package xml is an XML1.0 lexer following the specifications at http://www.w3.org/TR/xml/.
package xml // import "github.com/tdewolff/parse/xml"
package xml

import (
"io"
Expand Down
2 changes: 1 addition & 1 deletion xml/lex_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package xml // import "github.com/tdewolff/parse/xml"
package xml

import (
"bytes"
Expand Down
2 changes: 1 addition & 1 deletion xml/util.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package xml // import "github.com/tdewolff/parse/xml"
package xml

import "github.com/tdewolff/parse/v2"

Expand Down
2 changes: 1 addition & 1 deletion xml/util_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package xml // import "github.com/tdewolff/parse/xml"
package xml

import (
"testing"
Expand Down

0 comments on commit a24711f

Please sign in to comment.