Golint cleanup pkg/api

This commit is contained in:
Harshavardhana
2015-03-05 21:07:19 -08:00
parent 76e601b26b
commit 540723d7ae
15 changed files with 144 additions and 135 deletions

View File

@@ -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