http.gomods Plugin

This feature does not come with Caddy by default. To get it, select the http.gomods plugin when you download Caddy.

Create a config file like this example: gomods.test { gomods } The example above uses the default values for Go binary and number of parallel workers. To customize these values add these fields to your config file: gomods.test { gomods { gobinary /usr/bin/go workers 2 } } To enable caching you should also add the cache field to the config: gomods.test { gomods { cache } } Just like gomods itself, cache also uses its default values when not provided. You can specify fields like type and path to customize caching: gomods.test { gomods { cache { type local path /home/user/gomods_cache } } } To run Gomods use the following command:

Full documentation

Examples

Local gomods cache

gomods.test { gomods { cache { type local path /home/user/gomods_cache } } }

Setup Caddy with gomods enabled with aocal gomods cache.

Related Links

Documentation

Access the full documentation for this plugin off-site:

Docs

Plugin Help

Get help from the maintainers of the http.gomods plugin:

Support

Plugin Website

Visit http.gomods’s website for more information:

Website

Plugin Author: okkur

Last Updated: 27 Feb 2020, 7:13 PM

This plugin is independent of the Caddy project and is not endorsed or maintained by Caddy developers. Use at your own risk. Do not file issues for this plugin on Caddy’s bug tracker.