Skip to content

Commit bf90098

Browse files
committed
deleted binary file
1 parent a701b85 commit bf90098

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

WiringNilCheck.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func checkNilFields(obj interface{}, nilObjMap map[string]bool) {
4646
continue
4747
}
4848
if !isExported(fieldName) && !field.CanInterface() {
49-
unexportedField := GetUnexportedField(field, fieldName)
49+
unexportedField := GetUnexportedField(field)
5050
checkNilFields(unexportedField, nilObjMap)
5151
} else {
5252
// Recurse
@@ -69,7 +69,7 @@ func canFieldTypeBeNil(field reflect.Value) bool {
6969
func canSkipFieldStructCheck(fieldName, valName string) bool {
7070
fieldName = strings.ToLower(fieldName)
7171
valName = strings.ToLower(valName)
72-
if valName == "githubclient" && fieldName == "client" {
72+
if valName == "githubclient" && (fieldName == "client" || fieldName == "gitopshelper") {
7373
return true
7474
}
7575
for _, str := range []string{"logger", "dbconnection", "syncedenforcer"} {
@@ -80,7 +80,7 @@ func canSkipFieldStructCheck(fieldName, valName string) bool {
8080
return false
8181
}
8282

83-
func GetUnexportedField(field reflect.Value, fieldName string) interface{} {
83+
func GetUnexportedField(field reflect.Value) interface{} {
8484
return reflect.NewAt(field.Type(), unsafe.Pointer(field.UnsafeAddr())).Elem().Interface()
8585
}
8686

makeBinaryFileForWireNilChecker.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
echo "creating binary file..."
2+
cp auth_model.conf ./tests/integrationTesting
23
chmod 777 WiringNilCheck.go
34
go build -o wirenilcheckbinary .
45
chmod 557 WiringNilCheck.go
5-
echo "binary file created"
6-
ls | grep wirenilcheckbinary # checking whether binary file is created or not
7-
./wirenilcheckbinary
6+
mv wirenilcheckbinary ./tests/integrationTesting
7+
cd tests/integrationTesting
8+
echo "binary file $(ls | grep wirenilcheckbinary) is created"

0 commit comments

Comments
 (0)