Open PatrickLerner opened 4 years ago
@PatrickLerner please see my PR which fixes this issue by ignoring NULL values in transformable fields.
I'm running into this issue right now and would appreciate if this PR gets merged!
I used this PR and still getting the same error. Please help. I am building it on my mac using the following command
GOOS=linux GOARCH=amd64 go build -v github.com/NikolaiGulatz/go-anonymize-mysqldump
The build is success but same issue with the null values
Hey @fadiadawi,
When I compiled the binary from Nikolai's branch, I did it like so:
docker run -e GOOS=linux -e GOARCH=amd64 -v /tmp/crosstest:/go/bin golang bash -c "git clone 'https://github.com/NikolaiGulatz/go-anonymize-mysqldump.git' /go/src/go-anonymize-mysqldump && cd /go/src/go-anonymize-mysqldump && git checkout fix-for-null-values && go get . && go build"
I think the issue is that go does not check out the feature branch? I also remember that this was explicitly not a feature in go to build it from a branch for some reason or another (I don't use go usually).
Hope it helps 🤞
Hello and thank you for your reply. I am trying to run this command on my mac (host) . I tried:
GOOS=linux -e GOARCH=amd64 -v git clone 'https://github.com/NikolaiGulatz/go-anonymize-mysqldump.git' /go/src/go-anonymize-mysqldump && cd /go/src/go-anonymize-mysqldump && git checkout fix-for-null-values && go get . && go build but did not work. I also removed -r and -v and built a file but when I tried to run it I got an error saying that the file has incorrect format
On Wed, Feb 10, 2021 at 11:12 PM Patrick Lerner notifications@github.com wrote:
Hey @fadiadawi https://github.com/fadiadawi,
When I compiled the binary from Nikolai's branch, I did it like so:
docker run -e GOOS=linux -e GOARCH=amd64 -v /tmp/crosstest:/go/bin golang bash -c "git clone 'https://github.com/NikolaiGulatz/go-anonymize-mysqldump.git' /go/src/go-anonymize-mysqldump && cd /go/src/go-anonymize-mysqldump && git checkout fix-for-null-values && go get . && go build"
I think the issue is that go does not check out the feature branch? I also remember that this was explicitly not a feature in go to build it from a branch for some reason or another (I don't use go usually).
Hope it helps 🤞
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/humanmade/go-anonymize-mysqldump/issues/6#issuecomment-777244937, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASJUI25IAFBJKBDV6Z7FIRLS6N7OLANCNFSM4KMC3CEA .
Are you trying to run a linux binary on mac?
Maybe try this or similar:
docker run -e GOOS=darwin -e GOARCH=amd64 -v /tmp/crosstest:/go/bin golang bash -c "git clone 'https://github.com/NikolaiGulatz/go-anonymize-mysqldump.git' /go/src/go-anonymize-mysqldump && cd /go/src/go-anonymize-mysqldump && git checkout fix-for-null-values && go get . && go build"
if you need a mac binary :)
I tried but when I attempt to execute the file, I get this error: "cannot execute binary file: Exec format error"
On Thu, Feb 11, 2021 at 12:35 AM Patrick Lerner notifications@github.com wrote:
Are you trying to run a linux binary on mac?
Maybe try this or similar:
docker run -e GOOS=darwin -e GOARCH=amd64 -v /tmp/crosstest:/go/bin golang bash -c "git clone 'https://github.com/NikolaiGulatz/go-anonymize-mysqldump.git' /go/src/go-anonymize-mysqldump && cd /go/src/go-anonymize-mysqldump && git checkout fix-for-null-values && go get . && go build"
if you need a mac binary :)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/humanmade/go-anonymize-mysqldump/issues/6#issuecomment-777278464, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASJUI2YOZVRJDKYFTV4M7MTS6OJD7ANCNFSM4KMC3CEA .
I got it to work using a different approach. I forked the fix and created my own repo on GitHub. I was then able to build successfully using this : GOOS=linux GOARCH=amd64 go build -v github.com/my_user_name/go-anonymize-mysqldump I am not a GO coder. Thank you for all the help. I really appreciate it :)
On Thu, Feb 11, 2021 at 12:52 AM Fadi Adawi < fadi.adawi@foresightmentalhealth.com> wrote:
I tried but when I attempt to execute the file, I get this error: "cannot execute binary file: Exec format error"
On Thu, Feb 11, 2021 at 12:35 AM Patrick Lerner notifications@github.com wrote:
Are you trying to run a linux binary on mac?
Maybe try this or similar:
docker run -e GOOS=darwin -e GOARCH=amd64 -v /tmp/crosstest:/go/bin golang bash -c "git clone 'https://github.com/NikolaiGulatz/go-anonymize-mysqldump.git' /go/src/go-anonymize-mysqldump && cd /go/src/go-anonymize-mysqldump && git checkout fix-for-null-values && go get . && go build"
if you need a mac binary :)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/humanmade/go-anonymize-mysqldump/issues/6#issuecomment-777278464, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASJUI2YOZVRJDKYFTV4M7MTS6OJD7ANCNFSM4KMC3CEA .
Given a database like
if you use a config like
the tool will crash with a panic:
If
NULL
does not appear, it works fine.