Skip to content

Commit

Permalink
chore: utility functions
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
  • Loading branch information
leodido committed Dec 11, 2020
1 parent 2bc3b3e commit 9b13942
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions utils.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package main

import (
"reflect"
"unsafe"
)

func getUnexportedValue(field reflect.Value) reflect.Value {
return reflect.NewAt(field.Type(), unsafe.Pointer(field.UnsafeAddr())).Elem()
}

0 comments on commit 9b13942

Please sign in to comment.