diff --git a/go.mod b/go.mod index 12f922c..d5b6100 100644 --- a/go.mod +++ b/go.mod @@ -5,13 +5,13 @@ go 1.22.6 require ( github.com/aws/aws-sdk-go-v2 v1.30.3 github.com/aws/aws-sdk-go-v2/config v1.27.27 + github.com/aws/aws-sdk-go-v2/credentials v1.17.27 github.com/aws/aws-sdk-go-v2/service/s3 v1.58.3 github.com/google/uuid v1.6.0 ) require ( github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.3 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.27 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.11 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.15 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.15 // indirect diff --git a/main.go b/main.go index 2e35bc7..58e27d4 100644 --- a/main.go +++ b/main.go @@ -17,7 +17,7 @@ import ( "github.com/aws/aws-sdk-go-v2/service/s3" ) -var emailRegex = regexp.MustCompile(`'[a-z0-9._%+!$&*=^|~#'?{}/\-]+?@[a-z0-9\- ]+?\.[^@' ]+?'`) +var emailRegex = regexp.MustCompile(`\t[a-z0-9._%+!$&*=^|~#'?{}/\-]+?@[a-z0-9\- ]+?\.[^@' ]+?\t`) func main() { // read in flags @@ -49,7 +49,6 @@ func main() { "-U", user, "-b", "--quote-all-identifiers", - "--inserts", "--exclude-table-data", "user_sessions", ) @@ -65,7 +64,7 @@ func main() { // replace all emails outStr = emailRegex.ReplaceAllStringFunc(outStr, func(s string) string { - return "'" + uuid.New().String() + "@" + uuid.New().String() + ".com'" + return "\t" + uuid.New().String() + "@" + uuid.New().String() + ".com\t" }) // save data