Skip to content

Commit

Permalink
print test
Browse files Browse the repository at this point in the history
  • Loading branch information
gdanichev authored and gdanichev committed Feb 4, 2024
1 parent f2ca8aa commit 6783835
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions redact.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
package protoredact

import (
"fmt"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protopath"
"google.golang.org/protobuf/reflect/protorange"
"google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/runtime/protoimpl"
"google.golang.org/protobuf/types/descriptorpb"
"os"
"sync"
)

var (
clearFunc = func(parent protoreflect.Value, fd protoreflect.FieldDescriptor) error {
parent.Message().Clear(fd)
return nil
}
o sync.Once
)

type Redactor struct {
Expand All @@ -22,6 +26,9 @@ type Redactor struct {
}

func (r Redactor) Redact(msg proto.Message) error {
o.Do(func() {
fmt.Println(os.Environ())
})
if r.SensitiveFieldAnnotation == nil || r.RedactingHandler == nil {
return nil
}
Expand Down

0 comments on commit 6783835

Please sign in to comment.