Golint cleanup pkg/api
This commit is contained in:
@@ -19,21 +19,22 @@ package httpserver
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
// "time"
|
||||
)
|
||||
|
||||
type HttpServerConfig struct {
|
||||
// Config - http server config
|
||||
type Config struct {
|
||||
Address string
|
||||
TLS bool
|
||||
CertFile string
|
||||
KeyFile string
|
||||
Websocket bool // implement it - TODO
|
||||
Websocket bool // TODO
|
||||
}
|
||||
|
||||
type HttpServer struct{}
|
||||
// Server - http server related
|
||||
type Server struct{}
|
||||
|
||||
// Start http server
|
||||
func Start(handler http.Handler, config HttpServerConfig) (chan<- string, <-chan error, *HttpServer) {
|
||||
func Start(handler http.Handler, config HttpServerConfig) (chan<- string, <-chan error, *Server) {
|
||||
ctrlChannel := make(chan string)
|
||||
errorChannel := make(chan error)
|
||||
server := HttpServer{}
|
||||
@@ -42,7 +43,7 @@ func Start(handler http.Handler, config HttpServerConfig) (chan<- string, <-chan
|
||||
}
|
||||
|
||||
func start(ctrlChannel <-chan string, errorChannel chan<- error,
|
||||
router http.Handler, config HttpServerConfig, server *HttpServer) {
|
||||
router http.Handler, config Config, server *Server) {
|
||||
var err error
|
||||
|
||||
// Minio server config
|
||||
|
||||
Reference in New Issue
Block a user