Mutiple main files in golang project : I have a GOLANG project. When I run the program -main.go(with function main), it serves a web server serving a JSON object.

In the same folder I have another file - serializedata.go(with function main) which loads the JSON object into a file that is server by the web server.

Now, when I try to run go install I get this error - 

    ./serialize_data.go:17: main redeclared in this block
    	previous declaration at ./main.go:13

I want to keep both these files together as they are related. The test data needs to be serialized before it can be served.


How can I prevent to build the serialization.go file.

Im from python world and its easy to have these utils file separately.



