From 43b8f374db2f720f168bad590a48d772ae72a227 Mon Sep 17 00:00:00 2001 From: zzjc1234 <2359047351@qq.com> Date: Fri, 30 Aug 2024 14:06:01 +0800 Subject: [PATCH] chore: reorgnalize function --- pkg/healthcheck/forbidden.go | 9 --------- pkg/healthcheck/utils.go | 9 +++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pkg/healthcheck/forbidden.go b/pkg/healthcheck/forbidden.go index 2f40d4e..a07cbad 100644 --- a/pkg/healthcheck/forbidden.go +++ b/pkg/healthcheck/forbidden.go @@ -10,15 +10,6 @@ import ( "strings" ) -func inString(str1 string, strList []string) bool { - for _, str := range strList { - if str1 == str { - return true - } - } - return false -} - // getForbiddens retrieves a list of forbidden files in the specified root directory. // It searches for files that do not match the specified regex patterns in the given file list. func getForbiddens(root string, fileList []string, localList string) ([]string, error) { diff --git a/pkg/healthcheck/utils.go b/pkg/healthcheck/utils.go index 8939f22..005379a 100644 --- a/pkg/healthcheck/utils.go +++ b/pkg/healthcheck/utils.go @@ -5,6 +5,15 @@ import ( "regexp" ) +func inString(str1 string, strList []string) bool { + for _, str := range strList { + if str1 == str { + return true + } + } + return false +} + // addExt appends the specified extension to each file name in the given fileList. // It modifies the original fileList in place. func addExt(fileList []string, ext string) {