While building GO package, latest source code is not being consideed

I am trying to build a package with this command “go build”. It’s building the executable, But I see the changes in the source code are not considered. Even If i put some wrong syntax also, It’s still going ahead and building the executable.

I tried cleaning up cache. But it didn’t help.

Sometimes I find that the go files looks OK, but are not actually saved (…by Sublime in my case). This happens often to me that go build fetches the saved content and not what I am looking at. :slight_smile:

Do you get the same result from building it within the editor as well as the command line. A typical issues may involve the editor not saving your source code. It might be worth trying a different editor to verify the changes are being saved.

Thank you Guys for quick reply.

I was putting correct syntax only as the code was collapsed. But surprisingly, even after adding a lot of changes, executable size didn’t increase. But, I see those changes are getting compiled and executed.

So, from what I can tell, the issue is solved, great work.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.