From 6c34fe44924d64a796aa85e4c05e8d27decf83c1 Mon Sep 17 00:00:00 2001 From: jamesdubeheetch <114915318+jamesdubeheetch@users.noreply.github.com> Date: Thu, 27 Jul 2023 17:03:15 +0200 Subject: [PATCH] Migrate avro to GitHub actions (#122) --- .github/workflows/avro.yaml | 79 ++++++++++++++++++++++++++++++++ .github/workflows/test.yaml | 84 ---------------------------------- Makefile | 10 ++++ cmd/avrogo/externaltype.go | 3 +- cmd/avrogo/generate.go | 4 +- cmd/avrogo/generatetestcode.go | 10 ++-- cmd/avrogo/main.go | 25 +++++----- cmd/avrogo/template.go | 4 +- cmd/avsc2avdl/main.go | 5 +- cmd/go2avro/main.go | 5 +- encode.go | 9 ---- go.mod | 14 +++++- go.sum | 8 +--- gotype_test.go | 2 + test.sh | 7 --- 15 files changed, 133 insertions(+), 136 deletions(-) create mode 100644 .github/workflows/avro.yaml delete mode 100644 .github/workflows/test.yaml create mode 100644 Makefile delete mode 100755 test.sh diff --git a/.github/workflows/avro.yaml b/.github/workflows/avro.yaml new file mode 100644 index 0000000..b1215bd --- /dev/null +++ b/.github/workflows/avro.yaml @@ -0,0 +1,79 @@ +name: avro + +on: + push: + branches: + - master + - main + paths: + - '**.go' + - 'go.*' + - '**.cue' + - Makefile + pull_request: + paths: + - '**.go' + - 'go.*' + - '**.cue' + - Makefile + +concurrency: + group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} + cancel-in-progress: true + +env: + directory: "." + allow_lint_failure: "true" + +jobs: + test: + runs-on: ubuntu-22.04 + services: + registry: + image: lensesio/fast-data-dev:2.6.2-L0 + ports: + - 8081:8081 + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Set up env + uses: actions/setup-go@v3 + with: + cache: true + check-latest: true + cache-dependency-path: ${{ env.directory }}/go.sum + go-version-file: ${{ env.directory }}/go.mod + - name: Install Tools + shell: bash + run: | + go install github.com/mfridman/tparse@v0.12.1 + tgz=$(mktemp) + ARCH="$(uname -s)_$(uname -m)" + curl "https://github.com/cuelang/cue/releases/download/v0.0.15/cue_0.0.15_$ARCH.tar.gz" -L -o $tgz + (cd /usr/local/bin && tar xzf $tgz cue) + - name: "Lint: static" + id: lint-static + continue-on-error: false + uses: golangci/golangci-lint-action@v3 + with: + version: v1.52.2 + working-directory: ${{ env.directory }} + args: --timeout=5m + skip-cache: true + - name: "Lint: security" + id: lint-security + continue-on-error: true + working-directory: ${{ env.directory }} + run: | + go install golang.org/x/vuln/cmd/govulncheck@latest + govulncheck ./... + - name: Build + run: | + make build + - name: Unit tests + working-directory: ${{ env.directory }} + env: + CGO_ENABLED: "1" + KAFKA_REGISTRY_ADDR: 127.0.0.1:8081 + run: | + make test diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml deleted file mode 100644 index 37f4dde..0000000 --- a/.github/workflows/test.yaml +++ /dev/null @@ -1,84 +0,0 @@ -# Code generated by github.com/heetch/cue-schema/github/workflow/generate. DO NOT EDIT. -jobs: - test: - runs-on: ${{ matrix.platform }} - # container: ubuntu:latest - services: - registry: - image: lensesio/fast-data-dev:2.6.2-L0 - ports: - - 8081:8081 - - # zookeeper: - # image: confluentinc/cp-zookeeper:5.4.1 - # ports: - # - 32181:32181 - # env: - # ZOOKEEPER_CLIENT_PORT: "32181" - # ZOOKEEPER_SERVER_ID: 1 - # ZOOKEEPER_TICK_TIME: "2000" - - # kafka: - # image: confluentinc/cp-kafka:5.4.1 - # env: - # KAFKA_BROKER_ID: "1" - # KAFKA_ZOOKEEPER_CONNECT: localhost:32181 - # KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://0.0.0.0:29092,PLAINTEXT_HOST://0.0.0.0:9092 - # KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT - # KAFKA_INTER_BROKER_LISTENER_NAME: PLAINTEXT - # KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1" - # KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1 - # KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1 - # ports: - # - 9092:9092 - # - 29092:29092 - - # schemaregistry: - # image: confluentinc/cp-schema-registry:5.4.1 - # ports: - # - 8081:8081 - # env: - # SCHEMA_REGISTRY_HOST_NAME: schemaregistry - # SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL: localhost:32181 - # SCHEMA_REGISTRY_LISTENERS: http://0.0.0.0:8081 - # SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: PLAINTEXT://localhost:29092 - - steps: - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go }} - - name: Checkout code - uses: actions/checkout@v2 - # - name: Install curl gcc - # run: |- - # apt update - # apt install --yes curl gcc - - name: Test - env: - KAFKA_REGISTRY_ADDR: localhost:${{ job.services.registry.ports['8081'] }} - run: |- - set -ex - tgz=$(mktemp) - ARCH="$(uname -s)_$(uname -m)" - mkdir -p ~/go/bin - export PATH=$PATH:~/go/bin - curl "https://github.com/cuelang/cue/releases/download/v0.0.15/cue_0.0.15_$ARCH.tar.gz" -L -o $tgz - (cd ~/go/bin && tar xzf $tgz cue) - go install ./cmd/... && - go generate . ./cmd/... && - go test ./... || - docker logs -f $(docker ps -f 'name=lenses' -q) - strategy: - matrix: - go: - - 1.16 - - 1.17 - - 1.18 - - 1.19 - platform: - - ubuntu-latest -name: Test -"on": -- push -- pull_request diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..401a609 --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ + +.PHONY: test build + +build: + go build ./... + +test: + go install ./cmd/... + go generate . ./cmd/... + go test ./... -cover -race -timeout=2m -json ./... | tparse diff --git a/cmd/avrogo/externaltype.go b/cmd/avrogo/externaltype.go index a9d0075..fb2f560 100644 --- a/cmd/avrogo/externaltype.go +++ b/cmd/avrogo/externaltype.go @@ -5,7 +5,6 @@ import ( "encoding/json" "fmt" "go/format" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -133,7 +132,7 @@ func externalTypeInfoForGoTypes(gts map[goType]bool) (map[goType]avrotypemap.Ext fmt.Printf("%s\n", buf.Bytes()) return nil, fmt.Errorf("cannot format typeinfo source: %v", err) } - f, err := ioutil.TempFile(*dirFlag, "avro-introspect*.go") + f, err := os.CreateTemp(*dirFlag, "avro-introspect*.go") if err != nil { return nil, err } diff --git a/cmd/avrogo/generate.go b/cmd/avrogo/generate.go index 17b79df..46a3683 100644 --- a/cmd/avrogo/generate.go +++ b/cmd/avrogo/generate.go @@ -4,6 +4,8 @@ import ( "bytes" "encoding/json" "fmt" + "golang.org/x/text/cases" + "golang.org/x/text/language" "io" "regexp" "sort" @@ -423,7 +425,7 @@ func (gc *generateContext) defaultFuncLiteral(v interface{}, t schema.AvroType) func goName(s string) (string, error) { lastIndex := strings.LastIndex(s, ".") name := s[lastIndex+1:] - name = strings.Title(strings.Trim(name, "_")) + name = cases.Title(language.Und).String(strings.Trim(name, "_")) if !isExportedGoIdentifier(name) { return "", fmt.Errorf("cannot form an exported Go identifier from %q", s) } diff --git a/cmd/avrogo/generatetestcode.go b/cmd/avrogo/generatetestcode.go index 38e779e..2354a26 100644 --- a/cmd/avrogo/generatetestcode.go +++ b/cmd/avrogo/generatetestcode.go @@ -1,3 +1,4 @@ +//go:build ignore // +build ignore // This program generates all the test code in internal/generated_tests from @@ -11,7 +12,6 @@ import ( "fmt" "go/format" "io" - "io/ioutil" "log" "os" "os/exec" @@ -113,7 +113,7 @@ func main() { f = fmt.Sprintf("schema%d.avsc", i) } file := filepath.Join(dir, f) - err = ioutil.WriteFile(file, schema, 0666) + err = os.WriteFile(file, schema, 0666) check("create schema file", err) schemaFiles = append(schemaFiles, f) } @@ -152,7 +152,7 @@ func main() { } else { // The Go tool seems to require at least some // non-test code, at least when run with coverage engaged. - err = ioutil.WriteFile(filepath.Join(dir, "dummy.go"), []byte("package "+test.TestName+"\n"), 0666) + err = os.WriteFile(filepath.Join(dir, "dummy.go"), []byte("package "+test.TestName+"\n"), 0666) check("write dummy", err) } var buf bytes.Buffer @@ -163,7 +163,7 @@ func main() { goSource = buf.Bytes() } outFile := filepath.Join(dir, "roundtrip_test.go") - err = ioutil.WriteFile(outFile, goSource, 0666) + err = os.WriteFile(outFile, goSource, 0666) check("write test go file", err) if fmtErr != nil { check("gofmt test code "+outFile, fmtErr) @@ -171,7 +171,7 @@ func main() { if test.OtherTests != "" { otherTest, err := format.Source([]byte(test.OtherTests)) check("format other tests", err) - err = ioutil.WriteFile(filepath.Join(dir, "other_test.go"), otherTest, 0666) + err = os.WriteFile(filepath.Join(dir, "other_test.go"), otherTest, 0666) check("write other tests", err) } } diff --git a/cmd/avrogo/main.go b/cmd/avrogo/main.go index 17b956e..447980b 100644 --- a/cmd/avrogo/main.go +++ b/cmd/avrogo/main.go @@ -9,16 +9,16 @@ // // Usage: // -// usage: avrogo [flags] schema-file... -// -d string -// directory to write Go files to (default ".") -// -p string -// package name (defaults to $GOPACKAGE) -// -t generated files will have _test.go suffix -// -s string -// suffix for generated files (default "_gen") -// -tokenize -// if true, generate one dedicated file per qualified name found in the schema files +// usage: avrogo [flags] schema-file... +// -d string +// directory to write Go files to (default ".") +// -p string +// package name (defaults to $GOPACKAGE) +// -t generated files will have _test.go suffix +// -s string +// suffix for generated files (default "_gen") +// -tokenize +// if true, generate one dedicated file per qualified name found in the schema files // // By default, a type is generated for each Avro definition // in the schema. Some additional metadata fields are @@ -33,7 +33,6 @@ import ( stdflag "flag" "fmt" "go/format" - "io/ioutil" "os" "path" "path/filepath" @@ -216,7 +215,7 @@ func generateFile(outFile string, ns *parser.Namespace, definitions []schema.Qua return fmt.Errorf("cannot create output directory: %v", err) } outFile = filepath.Join(*dirFlag, outFile) - if err := ioutil.WriteFile(outFile, resultData, 0666); err != nil { + if err := os.WriteFile(outFile, resultData, 0666); err != nil { return err } return nil @@ -230,7 +229,7 @@ func parseFiles(files []string) (*parser.Namespace, [][]schema.QualifiedName, er var fileDefinitions [][]schema.QualifiedName ns := parser.NewNamespace(false) for _, f := range files { - data, err := ioutil.ReadFile(f) + data, err := os.ReadFile(f) if err != nil { return nil, nil, err } diff --git a/cmd/avrogo/template.go b/cmd/avrogo/template.go index 8e21276..b48071e 100644 --- a/cmd/avrogo/template.go +++ b/cmd/avrogo/template.go @@ -2,6 +2,8 @@ package main import ( "go/token" + "golang.org/x/text/cases" + "golang.org/x/text/language" "reflect" "regexp" "strconv" @@ -140,7 +142,7 @@ func defName(def schema.Definition) string { } func symbolName(e *schema.EnumDefinition, symbol string) string { - return defName(e) + strings.Title(symbol) + return defName(e) + cases.Title(language.Und).String(symbol) } func quote(s string) string { diff --git a/cmd/avsc2avdl/main.go b/cmd/avsc2avdl/main.go index e753c5a..709e03c 100644 --- a/cmd/avsc2avdl/main.go +++ b/cmd/avsc2avdl/main.go @@ -5,7 +5,6 @@ import ( "encoding/json" stdflag "flag" "fmt" - "io/ioutil" "os" "reflect" "sort" @@ -48,7 +47,7 @@ func main1() int { // avsc2avdl converts the AVSC data in the file avscFile and writes // it to outFile (or stdout if outFile is empty). func avsc2avdl(avscFile, outFile string) error { - data, err := ioutil.ReadFile(avscFile) + data, err := os.ReadFile(avscFile) if err != nil { return err } @@ -88,7 +87,7 @@ func avsc2avdl(avscFile, outFile string) error { if outFile == "" { os.Stdout.Write(g.buf.Bytes()) } else { - err := ioutil.WriteFile(outFile, g.buf.Bytes(), 0666) + err := os.WriteFile(outFile, g.buf.Bytes(), 0666) if err != nil { return fmt.Errorf("cannot create output file: %v", err) } diff --git a/cmd/go2avro/main.go b/cmd/go2avro/main.go index 1afb2e7..355be55 100644 --- a/cmd/go2avro/main.go +++ b/cmd/go2avro/main.go @@ -7,7 +7,6 @@ import ( stdflag "flag" "fmt" "go/format" - "io/ioutil" "os" "os/exec" "path/filepath" @@ -105,7 +104,7 @@ func buildGo(code []byte) (string, error) { // Create the Go file in the current directory so that we // take advantage of the current Go module. // TODO avoid the side-effect of adding the avro import, somehow. - tmpFile, err := ioutil.TempFile(".", "go2avro_temp_*.go") + tmpFile, err := os.CreateTemp(".", "go2avro_temp_*.go") if err != nil { return "", fmt.Errorf("cannot generate temp file: %v", err) } @@ -115,7 +114,7 @@ func buildGo(code []byte) (string, error) { if err != nil { return "", fmt.Errorf("cannot write %q: %v", tmpFile.Name(), err) } - tmpBinary, err := ioutil.TempFile(".", "go2avro_temp_bin") + tmpBinary, err := os.CreateTemp(".", "go2avro_temp_bin") if err != nil { return "", fmt.Errorf("cannot generate temp binary file: %v", err) } diff --git a/encode.go b/encode.go index a5aafc3..ed9b5c4 100644 --- a/encode.go +++ b/encode.go @@ -255,15 +255,6 @@ func logicalType(t schema.AvroType) string { return s } -func timestampMillisEncoder(e *encodeState, v reflect.Value) { - t := v.Interface().(time.Time) - if t.IsZero() { - e.writeLong(0) - } else { - e.writeLong(t.Unix()*1e3 + int64(t.Nanosecond())/int64(time.Millisecond)) - } -} - func timestampMicrosEncoder(e *encodeState, v reflect.Value) { t := v.Interface().(time.Time) if t.IsZero() { diff --git a/go.mod b/go.mod index 6a36223..56fdf9a 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/heetch/avro -go 1.16 +go 1.19 require ( github.com/actgardner/gogen-avro/v10 v10.2.1 @@ -9,6 +9,18 @@ require ( github.com/kr/pretty v0.3.0 github.com/linkedin/goavro/v2 v2.11.1 github.com/rogpeppe/go-internal v1.9.0 + golang.org/x/text v0.3.0 gopkg.in/httprequest.v1 v1.2.1 gopkg.in/retry.v1 v1.0.3 ) + +require ( + github.com/golang/snappy v0.0.4 // indirect + github.com/google/go-cmp v0.5.6 // indirect + github.com/julienschmidt/httprouter v1.3.0 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e // indirect + golang.org/x/net v0.0.0-20200505041828-1ed23360d12c // indirect + golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect + gopkg.in/errgo.v1 v1.0.0 // indirect +) diff --git a/go.sum b/go.sum index d522c08..6a4094e 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,7 @@ github.com/actgardner/gogen-avro/v10 v10.2.1 h1:z3pOGblRjAJCYpkIJ8CmbMJdksi4rAhaygw0dyXZ930= github.com/actgardner/gogen-avro/v10 v10.2.1/go.mod h1:QUhjeHPchheYmMDni/Nx7VB0RsT/ee8YIgGY/xpEQgQ= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/frankban/quicktest v1.2.2/go.mod h1:Qh/WofXFeiAFII1aEBu529AtJo6Zg2VHscnEsbBnJ20= github.com/frankban/quicktest v1.7.2/go.mod h1:jaStnuzAqU1AJdCO0l53JDCJrVDKcS03DbaAcR7Ks/o= github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= @@ -36,15 +34,12 @@ github.com/linkedin/goavro/v2 v2.11.1/go.mod h1:UgQUb2N/pmueQYH9bfqFioWxzYCZXSfF github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rogpeppe/clock v0.0.0-20190514195947-2896927a307a h1:3QH7VyOaaiUHNrA9Se4YQIRkDTCw1EJls9xTUCaCeRM= github.com/rogpeppe/clock v0.0.0-20190514195947-2896927a307a/go.mod h1:4r5QyqhjIWCcK8DO4KMclc5Iknq5qVBAlbYYzAbUScQ= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8= github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -59,6 +54,7 @@ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200505023115-26f46d2f7ef8/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= @@ -80,6 +76,4 @@ gopkg.in/retry.v1 v1.0.3 h1:a9CArYczAVv6Qs6VGoLMio99GEs7kY9UzSF9+LD+iGs= gopkg.in/retry.v1 v1.0.3/go.mod h1:FJkXmWiMaAo7xB+xhvDF59zhfjDWyzmyAxiT4dB688g= gopkg.in/yaml.v2 v2.2.7 h1:VUgggvou5XRW9mHwD/yXxIYSMtY0zoKQf/v226p2nyo= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= -gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/gotype_test.go b/gotype_test.go index 4836613..698efde 100644 --- a/gotype_test.go +++ b/gotype_test.go @@ -85,6 +85,7 @@ func TestEmptyGoStructType(t *testing.T) { c.Check(x, qt.Equals, T{}) } +//nolint:all func TestGoTypeWithOmittedFields(t *testing.T) { c := qt.New(t) type R struct { @@ -301,6 +302,7 @@ func TestGoTypeWithDuration(t *testing.T) { }) } +//nolint:all func TestGoTypeWithStructField(t *testing.T) { c := qt.New(t) type F2 struct { diff --git a/test.sh b/test.sh deleted file mode 100755 index 038a603..0000000 --- a/test.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -set -ex -PKG=github.com/heetch/avro -go install $PKG/cmd/avrogo -go generate $PKG/... -go test $PKG/...