1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-04-23 11:07:43 +02:00
Jerry 93ba8cd0df
continue fix pre version go get bug that unknown v3.5.1 (#2188)
* 1.fix plugins go get bug.
2.update all mode.
3.add tidy tools

* continue fix pre version go get bug that unknown v3.5.1
2021-06-30 09:24:00 +01:00
..
2020-12-26 15:32:45 +00:00
2020-12-26 15:32:45 +00:00
2021-06-30 07:21:03 +01:00
2021-01-20 21:01:10 +00:00
2020-12-26 15:32:45 +00:00
2021-01-20 21:01:10 +00:00
2021-01-20 21:01:10 +00:00

URL Source

The URL source reads config from a url.

It uses the Content-Type header as the format e.g application/json becomes json. The content itself is not touched. If we can't find a format we'll use the encoder format.

New Source

Specify url source with url. Defaults to http://localhost:8080/config.

urlSource := url.NewSource(
	url.WithURL("http://api.example.com/config"),
)

Load Source

Load the source into config

// Create new config
conf := config.NewConfig()

// Load url source
conf.Load(urlSource)