Skip to content

Commit

Permalink
upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
otofune committed Jan 7, 2025
1 parent b48ebea commit 1a10f06
Show file tree
Hide file tree
Showing 3 changed files with 213 additions and 471 deletions.
43 changes: 43 additions & 0 deletions bqmatcher/compile_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package bqmatcher_test

import (
"testing"

"github.com/aktsk/aealanlys/bqmatcher"
)

func TestCompileMuxRoutes(t *testing.T) {
tests := []struct {
name string
routes []bqmatcher.GorillaMuxRoute
funcname string
expected string
wantErr bool
}{
{
name: "simple",
routes: []bqmatcher.GorillaMuxRoute{
{Name: "index", Method: "GET", Pattern: "/"},
{Name: "show", Method: "GET", Pattern: "/{id:[0-9]+}"},
},
funcname: "F",
expected: `CREATE TEMPORARY FUNCTION RR(v STRING,rx STRING,re STRING) AS (REGEXP_REPLACE(v,rx,re));CREATE TEMPORARY FUNCTION F(m STRING,p STRING) AS (RR(RR(CONCAT(m," ",RR(p,"[?][^/]*$","")),"^GET /$","index"),"^GET /(?P<v0>[0-9]+)$","show"));`,
wantErr: false,
},
}

for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
m, err := bqmatcher.CompileMuxRoutes(tt.routes)
if (err != nil) != tt.wantErr {
t.Errorf("CompileMuxRoutes() error = %v; wantErr %v", err, tt.wantErr)
return
}

actual := m.PathToGroupingKeyBQUDF(tt.funcname)
if actual != tt.expected {
t.Errorf("CompileMuxRoutes() = '%v'; want '%v'", actual, tt.expected)
}
})
}
}
53 changes: 48 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,54 @@
module github.com/aktsk/aealanlys

go 1.18
go 1.22.0

require (
cloud.google.com/go/bigquery v1.22.0
github.com/gorilla/mux v1.6.2
google.golang.org/api v0.54.0
cloud.google.com/go/bigquery v1.65.0
github.com/gorilla/mux v1.8.1
google.golang.org/api v0.210.0
)

require github.com/gorilla/context v1.1.1 // indirect
require (
cloud.google.com/go v0.116.0 // indirect
cloud.google.com/go/auth v0.11.0 // indirect
cloud.google.com/go/auth/oauth2adapt v0.2.6 // indirect
cloud.google.com/go/compute/metadata v0.5.2 // indirect
cloud.google.com/go/iam v1.2.2 // indirect
github.com/apache/arrow/go/v15 v15.0.2 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/goccy/go-json v0.10.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/google/flatbuffers v23.5.26+incompatible // indirect
github.com/google/s2a-go v0.1.8 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.4 // indirect
github.com/googleapis/gax-go/v2 v2.14.0 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
github.com/pierrec/lz4/v4 v4.1.18 // indirect
github.com/zeebo/xxh3 v1.0.2 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0 // indirect
go.opentelemetry.io/otel v1.29.0 // indirect
go.opentelemetry.io/otel/metric v1.29.0 // indirect
go.opentelemetry.io/otel/trace v1.29.0 // indirect
golang.org/x/crypto v0.29.0 // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/mod v0.20.0 // indirect
golang.org/x/net v0.31.0 // indirect
golang.org/x/oauth2 v0.24.0 // indirect
golang.org/x/sync v0.9.0 // indirect
golang.org/x/sys v0.27.0 // indirect
golang.org/x/text v0.20.0 // indirect
golang.org/x/time v0.8.0 // indirect
golang.org/x/tools v0.24.0 // indirect
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da // indirect
google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20241113202542-65e8d215514f // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20241118233622-e639e219e697 // indirect
google.golang.org/grpc v1.67.1 // indirect
google.golang.org/protobuf v1.35.2 // indirect
)
Loading

0 comments on commit 1a10f06

Please sign in to comment.