demo code

main
Nick Dumas 1 year ago
parent 4748dab2ff
commit 87e489729c

@ -77,7 +77,7 @@ LDFLAGS = -X $(PKG).Version=$(VERSION) -X $(PKG).Build=$(COMMIT_ID)
GOBUILD = gox -osarch="!darwin/386" -rebuild -gocmd="$(GOCMD)" -arch="$(ARCHES)" -os="$(OSES)" -output="$(OUTTPL)" -tags "$(BUILD_TAGS)" -ldflags "$(LDFLAGS)" GOBUILD = gox -osarch="!darwin/386" -rebuild -gocmd="$(GOCMD)" -arch="$(ARCHES)" -os="$(OSES)" -output="$(OUTTPL)" -tags "$(BUILD_TAGS)" -ldflags "$(LDFLAGS)"
GOCLEAN = $(GOCMD) clean GOCLEAN = $(GOCMD) clean
GOINSTALL = $(GOCMD) install -a -tags "$(BUILD_TAGS)" -ldflags "$(LDFLAGS)" GOINSTALL = $(GOCMD) install -a -tags "$(BUILD_TAGS)" -ldflags "$(LDFLAGS)"
GOTEST = $(GOCMD) test -v -tags "$(BUILD_TAGS)" GOTEST = $(GOCMD) test -race -v -tags "$(BUILD_TAGS)"
DISABLED_LINTERS = varnamelen,interfacer,ifshort,exhaustivestruct,maligned,varcheck,scopelint,structcheck,deadcode,nosnakecase,golint,depguard DISABLED_LINTERS = varnamelen,interfacer,ifshort,exhaustivestruct,maligned,varcheck,scopelint,structcheck,deadcode,nosnakecase,golint,depguard
GOLINT = golangci-lint run --enable-all --disable "$(DISABLED_LINTERS)" --timeout=30s --tests GOLINT = golangci-lint run --enable-all --disable "$(DISABLED_LINTERS)" --timeout=30s --tests
GODEP = $(GOCMD) get -d -t GODEP = $(GOCMD) get -d -t

@ -54,6 +54,7 @@ func (l *Lexer) NextItem() Item {
return item return item
default: default:
if l.state == nil { if l.state == nil {
l.L.Named("NextItem").Errorw("state should not be nil")
return Item{ return Item{
Typ: ItemError, Typ: ItemError,
Val: "state is nil, should not be", Val: "state is nil, should not be",

@ -6,7 +6,7 @@ import (
"code.ndumas.com/ndumas/wikilink-parser" "code.ndumas.com/ndumas/wikilink-parser"
) )
func Test_Wikilink_Parsing(t *testing.T) { func _Test_Wikilink_Parsing(t *testing.T) {
t.Parallel() t.Parallel()
tcs := []struct { tcs := []struct {

Loading…
Cancel
Save