Update server dependencies

This commit is contained in:
Ken-Håvard Lieng 2020-04-29 04:23:32 +02:00
parent c704ebb042
commit 1794e2680a
369 changed files with 23554 additions and 6306 deletions

View file

@ -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

View file

@ -1,4 +1,4 @@
package buffer // import "github.com/tdewolff/parse/buffer"
package buffer
import (
"io"
@ -52,7 +52,7 @@ func NewLexerBytes(b []byte) *Lexer {
n := len(b)
if n == 0 {
z.buf = nullBuffer
} else if b[n-1] != 0 {
} else {
// Append NULL to buffer, but try to avoid reallocation
if cap(b) > n {
// Overwrite next byte but restore when done

View file

@ -1,4 +1,4 @@
package buffer // import "github.com/tdewolff/parse/buffer"
package buffer
import "io"

View file

@ -1,4 +1,4 @@
package buffer // import "github.com/tdewolff/parse/buffer"
package buffer
import (
"io"

View file

@ -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 {