Configuring Go Image Acceleration (Based on ServBay Control Panel)
Why Configure Go Images
In Go development, the speed of downloading dependency packages directly affects productivity. As the default proxy.golang.org
is slow to access in some countries/regions, configuring Go images can significantly enhance module download speeds. ServBay offers a convenient interface for image configuration, allowing you to complete the setup without manually modifying environment variables.
Go Image Configuration in ServBay
Configuration Steps
Access the Go Configuration Interface
- Log in to the ServBay control panel
- In the left navigation bar, select
Languages
>Go Config
Select Image Source
- In the configuration area, you will see the default image address
https://goproxy.cn/index
- To modify it, simply edit the address in the input box
- In the configuration area, you will see the default image address
Save Settings
- Click the
Save
button at the bottom right to save your configuration - To restore defaults, click the
Reset
button
- Click the
Recommended Image Addresses
Below are commonly used Go module images:
https://goproxy.cn
(provided by Qiniu Cloud)https://goproxy.io
Configuration Verification
After configuration, you can verify if it is effective by running the following command:
go env GOPROXY
# https://goproxy.cn,direct
2
If you notice a significant increase in download speed, it indicates that the image configuration was successful.
Important Notes
- The image configuration will globally affect all Go projects in the current ServBay environment.
- Some private modules may require setting to
direct
mode. - Different Go versions may have slight variations in image support.
This feature of ServBay makes configuring the Go development environment simpler and more efficient, especially for developers.