summaryrefslogtreecommitdiff
path: root/modules/caddyhttp
diff options
context:
space:
mode:
authorMatthew Holt <mholt@users.noreply.github.com>2021-06-03 12:18:25 -0600
committerMatthew Holt <mholt@users.noreply.github.com>2021-06-03 12:18:25 -0600
commitecd5eeab3857a0d6903a85bf52183171bda1920c (patch)
treed585c6168741855f6647759f63f6fa820ded1c73 /modules/caddyhttp
parentb4cef492cc2b4c6ee0e43b083488823cbf5e3a48 (diff)
go.mod: Update direct dependencies
Diffstat (limited to 'modules/caddyhttp')
-rw-r--r--modules/caddyhttp/celmatcher.go4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/caddyhttp/celmatcher.go b/modules/caddyhttp/celmatcher.go
index bab0a07..d7d55d8 100644
--- a/modules/caddyhttp/celmatcher.go
+++ b/modules/caddyhttp/celmatcher.go
@@ -35,7 +35,6 @@ import (
"github.com/google/cel-go/interpreter/functions"
exprpb "google.golang.org/genproto/googleapis/api/expr/v1alpha1"
"google.golang.org/protobuf/proto"
- timestamp "google.golang.org/protobuf/types/known/timestamppb"
)
func init() {
@@ -231,8 +230,7 @@ func (celTypeAdapter) NativeToValue(value interface{}) ref.Val {
case pkix.Name:
return celPkixName{&v}
case time.Time:
- // TODO: eliminate direct protobuf dependency, sigh -- just wrap stdlib time.Time instead...
- return types.Timestamp{Timestamp: &timestamp.Timestamp{Seconds: v.Unix(), Nanos: int32(v.Nanosecond())}}
+ return types.Timestamp{Time: v}
case error:
types.NewErr(v.Error())
}