Created
May 6, 2021 08:42
-
-
Save artspb/8ba368a4b4a2eaff6946ce5f89169c34 to your computer and use it in GitHub Desktop.
A way to update GOROOT and Go modules integration for a GoLand project.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sed -i.bak '/<component name="GOROOT".*/d' ".idea/workspace.xml" | |
sed -i.bak '/<project.*/a\ | |
<component name="GOROOT" url="file://$USER_HOME$/go/go1.16.3" />\ | |
' ".idea/workspace.xml" | |
sed -i.bak '/<component name="VgoProject">/,+2d' ".idea/workspace.xml" | |
sed -i.bak '/<project.*/a\ | |
<component name="VgoProject">\ | |
<integration-enabled>true</integration-enabled>\ | |
</component>\ | |
' ".idea/workspace.xml" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment