violetear | Keep it simple and small , avoiding extra complexity | HTTP library
kandi X-RAY | violetear Summary
kandi X-RAY | violetear Summary
Go HTTP router
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- GetParam returns the first parameter from the request
- GetParams retrieves a list of params from the request
- GetRouteName returns the route name from the request
- logger logs the request
- New returns a new Router
- NewResponseWriter returns a new ResponseWriter
- Extend returns a new chain with the given chain .
violetear Key Features
violetear Examples and Code Snippets
Community Discussions
Trending Discussions on violetear
QUESTION
I want to dynamically create an HTTP router using custom plugins/middleware, currently, I am using a config.yml
for example:
ANSWER
Answered 2017-May-29 at 16:12Go is a statically linked language. This means if a package is not referenced at compile time (from your .go
source files), that package will not be linked / compiled into the executable binary, which implies it will not be availabe at runtime.
So the easiest is to just use imports.
If you want truly dynamic configuration, plugins introduced in Go 1.8 may be an option for you, but using plugins complicates things and I would only use that as a last resort. Also note that plugins currently only work on linux.
Related questions:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install violetear
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page