LoadConfig loads config bytes from the external provider first, then from the embedded templates kept for standalone spray compatibility.
(typ string)
| 60 | // LoadConfig loads config bytes from the external provider first, then from |
| 61 | // the embedded templates kept for standalone spray compatibility. |
| 62 | func LoadConfig(typ string) []byte { |
| 63 | resourceProvider.RLock() |
| 64 | provider := resourceProvider.fn |
| 65 | resourceProvider.RUnlock() |
| 66 | if provider != nil { |
| 67 | if data := provider(typ); len(data) > 0 { |
| 68 | return data |
| 69 | } |
| 70 | } |
| 71 | return loadEmbeddedConfig(typ) |
| 72 | } |
no test coverage detected