Skip to content

Commit

Permalink
feat: [CN-33] add a support of uintptr type (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
vpakhuchyi committed Jan 13, 2024
1 parent 167ae34 commit f7814e4
Show file tree
Hide file tree
Showing 21 changed files with 98 additions and 83 deletions.
6 changes: 2 additions & 4 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
- string, bool
- float64/float32, complex64/complex128
- int/int8/int16/int32/int64/rune
- uint/uint8/uint16/uint32/uint64/byte
- uint/uint8/uint16/uint32/uint64/uintptr/byte
- Customizable configuration: Offers flexibility in configuration through the use of a `.yaml` file or by
directly passing a `config.Config` struct.
Expand Down Expand Up @@ -97,9 +97,7 @@
Unsupported Types:
|------------|------------|------------|
| Chan | Uintptr | Func |
|------------|------------|------------|
| UnsafePtr | | |
| Chan | UnsafePtr | Func |
|------------|------------|------------|
If a value of an unsupported type is provided, a string value with the following format will be returned:
Expand Down
8 changes: 3 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ go get -u github.com/vpakhuchyi/censor
- [x] Wide range of supported types:
- `struct`, `map`, `slice`, `array`, `pointer`, `string`,
- `float64/float32`, `int/int8/int16/int32/int64/rune`,
- `uint/uint8/uint16/uint32/uint64/byte`, `bool`,
- `uint/uint8/uint16/uint32/uint64/uintptr/byte`, `bool`,
- `interface`, `complex64/complex128`.
- [x] Support encoding.TextMarshaler interface for custom types.
- [x] Customizable configuration:
Expand Down Expand Up @@ -632,7 +632,7 @@ func main() {
There is no specific formatting for the following types:

- Int/Int8/Int16/Int32/Int64
- Uint/Uint8/Byte/Uint16/Uint32/Uint64
- Uint/Uint8/Byte/Uint16/Uint32/Uint64/Uintptr
- Bool

Rules of fmt package are applied to them.
Expand All @@ -655,20 +655,18 @@ type s struct {
Chan chan int `censor:"display"`
Func func() `censor:"display"`
UnsafePointer unsafe.Pointer `censor:"display"`
UintPtr uintptr `censor:"display"`
}

func main() {
v := s{
Chan: make(chan int),
Func: func() {},
UnsafePointer: unsafe.Pointer(uintptr(1)),
UintPtr: uintptr(1),
}

slog.Info("Request", "payload", censor.Format(v))
// Here is what we'll see in the log:
//Output: `2038/10/25 12:00:01 INFO Request payload={Chan: [Unsupported type: chan], Func: [Unsupported type: func], UnsafePointer: [Unsupported type: unsafe.Pointer], UintPtr: [Unsupported type: uintptr]}`
//Output: `2038/10/25 12:00:01 INFO Request payload={Chan: [Unsupported type: chan], Func: [Unsupported type: func], UnsafePointer: [Unsupported type: unsafe.Pointer]}`
}

```
4 changes: 2 additions & 2 deletions internal/formatter/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (f *Formatter) writeValue(buf *strings.Builder, v models.Value) {
case reflect.String:
buf.WriteString(f.String(v))
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
buf.WriteString(f.Integer(v))
case reflect.Float32, reflect.Float64:
buf.WriteString(f.Float(v))
Expand Down Expand Up @@ -94,7 +94,7 @@ func (f *Formatter) writeField(field models.Field, buf *strings.Builder) {
case reflect.String:
buf.WriteString(formatField(field.Name, f.String(field.Value)))
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
buf.WriteString(formatField(field.Name, f.Integer(field.Value)))
case reflect.Float32, reflect.Float64:
buf.WriteString(formatField(field.Name, f.Float(field.Value)))
Expand Down
37 changes: 27 additions & 10 deletions internal/formatter/format_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,16 @@ func TestFormatter_writeValue(t *testing.T) {
})
})

t.Run("uintptr", func(t *testing.T) {
t.Cleanup(func() { buf.Reset() })
require.NotPanics(t, func() {
v := models.Value{Value: uintptr(824634330992), Kind: reflect.Uint64}
f.writeValue(&buf, v)
exp := "824634330992"
require.Equal(t, exp, buf.String())
})
})

t.Run("byte", func(t *testing.T) {
t.Cleanup(func() { buf.Reset() })
require.NotPanics(t, func() {
Expand Down Expand Up @@ -370,16 +380,6 @@ func TestFormatter_writeValue(t *testing.T) {
})
})

t.Run("unsupported_type_uintptr", func(t *testing.T) {
t.Cleanup(func() { buf.Reset() })
require.NotPanics(t, func() {
v := models.Value{Value: "[Unsupported type: uintptr]", Kind: reflect.Uintptr}
f.writeValue(&buf, v)
exp := `[Unsupported type: uintptr]`
require.Equal(t, exp, buf.String())
})
})

t.Run("unsupported_type_unsafe_pointer", func(t *testing.T) {
t.Cleanup(func() { buf.Reset() })
require.NotPanics(t, func() {
Expand Down Expand Up @@ -579,6 +579,23 @@ func TestFormatter_writeField(t *testing.T) {
})
})

t.Run("uintptr", func(t *testing.T) {
t.Cleanup(func() { buf.Reset() })
require.NotPanics(t, func() {
var b uintptr = 824634330992
field := models.Field{
Name: "Age",
Value: models.Value{
Value: b,
Kind: reflect.Uintptr,
},
}
f.writeField(field, &buf)
exp := `Age: 824634330992`
require.Equal(t, exp, buf.String())
})
})

t.Run("rune", func(t *testing.T) {
t.Cleanup(func() { buf.Reset() })
require.NotPanics(t, func() {
Expand Down
2 changes: 1 addition & 1 deletion internal/formatter/integer.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
func (f *Formatter) Integer(v models.Value) string {
switch v.Kind {
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
return fmt.Sprintf(`%d`, v.Value)
default:
panic("provided value is not an integer")
Expand Down
2 changes: 1 addition & 1 deletion internal/formatter/map.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
// [basic types]
// - string
// - int, int8, int16, int32, int64
// - uint, uint8, uint16, uint32, uint64
// - uint, uint8, uint16, uint32, uint64, uintptr
// - float32, float64
// - bool
// - byte - represented as uint8
Expand Down
4 changes: 1 addition & 3 deletions internal/formatter/struct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,10 @@ func TestFormatter_Struct(t *testing.T) {
{Name: "Func", Value: models.Value{Value: "[Unsupported type: func]", Kind: reflect.Func}, Opts: options.FieldOptions{Display: false}},
{Name: "UnsafeWithCensorTag", Value: models.Value{Value: "[Unsupported type: unsafe.Pointer]", Kind: reflect.UnsafePointer}, Opts: options.FieldOptions{Display: true}},
{Name: "Unsafe", Value: models.Value{Value: "[Unsupported type: unsafe.Pointer]", Kind: reflect.UnsafePointer}, Opts: options.FieldOptions{Display: false}},
{Name: "UintPtrWithCensorTag", Value: models.Value{Value: "[Unsupported type: uintptr]", Kind: reflect.Uintptr}, Opts: options.FieldOptions{Display: true}},
{Name: "UintPtr", Value: models.Value{Value: "[Unsupported type: uintptr]", Kind: reflect.Uintptr}, Opts: options.FieldOptions{Display: false}},
},
}
got := f.Struct(v)
exp := `{ChanWithCensorTag: [Unsupported type: chan], Chan: [CENSORED], FuncWithCensorTag: [Unsupported type: func], Func: [CENSORED], UnsafeWithCensorTag: [Unsupported type: unsafe.Pointer], Unsafe: [CENSORED], UintPtrWithCensorTag: [Unsupported type: uintptr], UintPtr: [CENSORED]}`
exp := `{ChanWithCensorTag: [Unsupported type: chan], Chan: [CENSORED], FuncWithCensorTag: [Unsupported type: func], Func: [CENSORED], UnsafeWithCensorTag: [Unsupported type: unsafe.Pointer], Unsafe: [CENSORED]}`
require.Equal(t, exp, got)
})
})
Expand Down
4 changes: 2 additions & 2 deletions internal/parser/int.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import (
"github.com/vpakhuchyi/censor/internal/models"
)

// Integer parses an integer (int/int8/int16/int32/int64/uint/uint8/uint16/uint32/uint64/byte/rune) and returns a models.Value.
// Integer parses an integer (int/int8/int16/int32/int64/uint/uint8/uint16/uint32/uint64/uintptr/byte/rune) and returns a models.Value.
// Note: this method panics if the provided value is not an integer.
//
//nolint:exhaustive
func (p *Parser) Integer(rv reflect.Value) models.Value {
switch k := rv.Kind(); k {
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
return models.Value{
Value: rv.Interface(),
Kind: k,
Expand Down
9 changes: 9 additions & 0 deletions internal/parser/int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,15 @@ func TestParser_Integer(t *testing.T) {
})
})

t.Run("successful_uintptr", func(t *testing.T) {
require.NotPanics(t, func() {
var v uintptr = 824634330992
got := p.Integer(reflect.ValueOf(v))
exp := models.Value{Value: uintptr(824634330992), Kind: reflect.Uintptr}
require.Equal(t, exp, got)
})
})

t.Run("successful_byte", func(t *testing.T) {
require.NotPanics(t, func() {
var v byte = 122
Expand Down
2 changes: 1 addition & 1 deletion internal/parser/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (p *Parser) Interface(rv reflect.Value) models.Value {
case reflect.String:
return p.String(rv.Elem())
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
return p.Integer(rv.Elem())
case reflect.Float32, reflect.Float64:
return p.Float(rv.Elem())
Expand Down
2 changes: 1 addition & 1 deletion internal/parser/interface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ func TestParser_Interface(t *testing.T) {
{
Name: "Names",
Value: models.Value{
Value: models.Value{Value: "[Unsupported type: uintptr]", Kind: reflect.Uintptr},
Value: models.Value{Value: uintptr(56784757), Kind: reflect.Uintptr},
Kind: reflect.Interface,
},
Opts: options.FieldOptions{Display: false},
Expand Down
4 changes: 2 additions & 2 deletions internal/parser/map.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (p *Parser) Map(rv reflect.Value) models.Map {
case reflect.String:
pair.Key = p.String(key)
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
pair.Key = p.Integer(key)
case reflect.Float32, reflect.Float64:
pair.Key = p.Float(key)
Expand All @@ -68,7 +68,7 @@ func (p *Parser) Map(rv reflect.Value) models.Map {
case reflect.String:
pair.Value = p.String(value)
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
pair.Value = p.Integer(value)
case reflect.Float32, reflect.Float64:
pair.Value = p.Float(value)
Expand Down
8 changes: 4 additions & 4 deletions internal/parser/map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,8 @@ func TestParser_Map(t *testing.T) {
exp := models.Map{
Type: "map[string]uintptr",
Values: []models.KV{
{Key: models.Value{Value: "key1", Kind: reflect.String}, Value: models.Value{Value: "[Unsupported type: uintptr]", Kind: reflect.Uintptr}, SortValue: "key1"},
{Key: models.Value{Value: "key2", Kind: reflect.String}, Value: models.Value{Value: "[Unsupported type: uintptr]", Kind: reflect.Uintptr}, SortValue: "key2"},
{Key: models.Value{Value: "key1", Kind: reflect.String}, Value: models.Value{Value: uintptr(4563456346), Kind: reflect.Uintptr}, SortValue: "key1"},
{Key: models.Value{Value: "key2", Kind: reflect.String}, Value: models.Value{Value: uintptr(7586784657), Kind: reflect.Uintptr}, SortValue: "key2"},
},
}

Expand Down Expand Up @@ -628,8 +628,8 @@ func TestParser_Map(t *testing.T) {
exp := models.Map{
Type: "map[uintptr]string",
Values: []models.KV{
{SortValue: "4563456346", Key: models.Value{Value: "[Unsupported type: uintptr]", Kind: reflect.Uintptr}, Value: models.Value{Value: "value1", Kind: reflect.String}},
{SortValue: "7586784657", Key: models.Value{Value: "[Unsupported type: uintptr]", Kind: reflect.Uintptr}, Value: models.Value{Value: "value2", Kind: reflect.String}},
{SortValue: "4563456346", Key: models.Value{Value: uintptr(4563456346), Kind: reflect.Uintptr}, Value: models.Value{Value: "value1", Kind: reflect.String}},
{SortValue: "7586784657", Key: models.Value{Value: uintptr(7586784657), Kind: reflect.Uintptr}, Value: models.Value{Value: "value2", Kind: reflect.String}},
},
}

Expand Down
2 changes: 1 addition & 1 deletion internal/parser/pointer.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func (p *Parser) Ptr(rv reflect.Value) models.Ptr {
case reflect.String:
return models.Ptr(p.String(rv.Elem()))
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
return models.Ptr(p.Integer(rv.Elem()))
case reflect.Float32, reflect.Float64:
return models.Ptr(p.Float(rv.Elem()))
Expand Down
2 changes: 1 addition & 1 deletion internal/parser/pointer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func TestParser_Pointer(t *testing.T) {
require.NotPanics(t, func() {
v := uintptr(0)
got := p.Ptr(reflect.ValueOf(&v))
exp := models.Ptr{Value: "[Unsupported type: uintptr]", Kind: reflect.Uintptr}
exp := models.Ptr{Value: uintptr(0), Kind: reflect.Uintptr}

require.Equal(t, exp, got)
})
Expand Down
2 changes: 1 addition & 1 deletion internal/parser/slice.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (p *Parser) Slice(rv reflect.Value) models.Slice {
case reflect.String:
slice.Values = append(slice.Values, p.String(elem))
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
slice.Values = append(slice.Values, p.Integer(elem))
case reflect.Float32, reflect.Float64:
slice.Values = append(slice.Values, p.Float(elem))
Expand Down
4 changes: 2 additions & 2 deletions internal/parser/slice_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,8 @@ func TestParser_Slice(t *testing.T) {
got := p.Slice(reflect.ValueOf(v))
exp := models.Slice{
Values: []models.Value{
{Value: "[Unsupported type: uintptr]", Kind: reflect.Uintptr},
{Value: "[Unsupported type: uintptr]", Kind: reflect.Uintptr},
{Value: uintptr(1), Kind: reflect.Uintptr},
{Value: uintptr(2), Kind: reflect.Uintptr},
},
}

Expand Down
2 changes: 1 addition & 1 deletion internal/parser/struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func (p *Parser) Struct(rv reflect.Value) models.Struct {
case reflect.Float32, reflect.Float64:
field.Value = p.Float(f)
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
field.Value = p.Integer(f)
case reflect.Complex64, reflect.Complex128:
field.Value = p.Complex(f)
Expand Down
53 changes: 25 additions & 28 deletions internal/parser/struct_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,22 +56,23 @@ func TestParser_Struct(t *testing.T) {

t.Run("struct_with_integers", func(t *testing.T) {
type integers struct {
Int int `json:"int" censor:"display"`
Int8 int8 `json:"int8" censor:"display"`
Int16 int16 `json:"int16" censor:"display"`
Int32 int32 `json:"int32" censor:"display"`
Int64 int64 `json:"int64" censor:"display"`
Uint uint `json:"uint" censor:"display"`
Uint8 uint8 `json:"uint8" censor:"display"`
Uint16 uint16 `json:"uint16" censor:"display"`
Uint32 uint32 `json:"uint32" censor:"display"`
Uint64 uint64 `json:"uint64" censor:"display"`
Byte byte `json:"byte" censor:"display"`
Rune rune `json:"rune" censor:"display"`
Int int `json:"int" censor:"display"`
Int8 int8 `json:"int8" censor:"display"`
Int16 int16 `json:"int16" censor:"display"`
Int32 int32 `json:"int32" censor:"display"`
Int64 int64 `json:"int64" censor:"display"`
Uint uint `json:"uint" censor:"display"`
Uint8 uint8 `json:"uint8" censor:"display"`
Uint16 uint16 `json:"uint16" censor:"display"`
Uint32 uint32 `json:"uint32" censor:"display"`
Uint64 uint64 `json:"uint64" censor:"display"`
Uintptr uintptr `json:"uintptr" censor:"display"`
Byte byte `json:"byte" censor:"display"`
Rune rune `json:"rune" censor:"display"`
}

require.NotPanics(t, func() {
v := integers{Int: 1, Int8: 2, Int16: 3, Int32: 4, Int64: 5, Uint: 6, Uint8: 7, Uint16: 8, Uint32: 9, Uint64: 10, Byte: 11, Rune: 'y'}
v := integers{Int: 1, Int8: 2, Int16: 3, Int32: 4, Int64: 5, Uint: 6, Uint8: 7, Uint16: 8, Uint32: 9, Uint64: 10, Uintptr: 11, Byte: 12, Rune: 'y'}
got := p.Struct(reflect.ValueOf(v))
exp := models.Struct{
Name: "parser.integers",
Expand All @@ -86,7 +87,8 @@ func TestParser_Struct(t *testing.T) {
{Name: "Uint16", Value: models.Value{Value: uint16(8), Kind: reflect.Uint16}, Opts: options.FieldOptions{Display: true}},
{Name: "Uint32", Value: models.Value{Value: uint32(9), Kind: reflect.Uint32}, Opts: options.FieldOptions{Display: true}},
{Name: "Uint64", Value: models.Value{Value: uint64(10), Kind: reflect.Uint64}, Opts: options.FieldOptions{Display: true}},
{Name: "Byte", Value: models.Value{Value: byte(11), Kind: reflect.Uint8}, Opts: options.FieldOptions{Display: true}},
{Name: "Uintptr", Value: models.Value{Value: uintptr(11), Kind: reflect.Uintptr}, Opts: options.FieldOptions{Display: true}},
{Name: "Byte", Value: models.Value{Value: byte(12), Kind: reflect.Uint8}, Opts: options.FieldOptions{Display: true}},
{Name: "Rune", Value: models.Value{Value: rune(121), Kind: reflect.Int32}, Opts: options.FieldOptions{Display: true}},
},
}
Expand Down Expand Up @@ -575,22 +577,19 @@ func TestParser_Struct(t *testing.T) {

t.Run("struct_with_unsupported_types", func(t *testing.T) {
type structWithUnsupportedTypes struct {
ChanWithCensorTag chan int `censor:"display"`
Chan chan int
FuncWithCensorTag func() `censor:"display"`
Func func()
UnsafeWithCensorTag unsafe.Pointer `censor:"display"`
Unsafe unsafe.Pointer
UintPtrWithCensorTag uintptr `censor:"display"`
UintPtr uintptr
ChanWithCensorTag chan int `censor:"display"`
Chan chan int
FuncWithCensorTag func() `censor:"display"`
Func func()
UnsafeWithCensorTag unsafe.Pointer `censor:"display"`
Unsafe unsafe.Pointer
}

require.NotPanics(t, func() {
v := structWithUnsupportedTypes{
Chan: make(chan int),
Func: func() {},
Unsafe: unsafe.Pointer(&mainPkgStruct),
UintPtr: uintptr(unsafe.Pointer(&mainPkgStruct)),
Chan: make(chan int),
Func: func() {},
Unsafe: unsafe.Pointer(&mainPkgStruct),
}

got := p.Struct(reflect.ValueOf(v))
Expand All @@ -603,8 +602,6 @@ func TestParser_Struct(t *testing.T) {
{Name: "Func", Value: models.Value{Value: "[Unsupported type: func]", Kind: reflect.Func}, Opts: options.FieldOptions{Display: false}},
{Name: "UnsafeWithCensorTag", Value: models.Value{Value: "[Unsupported type: unsafe.Pointer]", Kind: reflect.UnsafePointer}, Opts: options.FieldOptions{Display: true}},
{Name: "Unsafe", Value: models.Value{Value: "[Unsupported type: unsafe.Pointer]", Kind: reflect.UnsafePointer}, Opts: options.FieldOptions{Display: false}},
{Name: "UintPtrWithCensorTag", Value: models.Value{Value: "[Unsupported type: uintptr]", Kind: reflect.Uintptr}, Opts: options.FieldOptions{Display: true}},
{Name: "UintPtr", Value: models.Value{Value: "[Unsupported type: uintptr]", Kind: reflect.Uintptr}, Opts: options.FieldOptions{Display: false}},
},
}
require.Equal(t, exp, got)
Expand Down

0 comments on commit f7814e4

Please sign in to comment.