summaryrefslogtreecommitdiff
path: root/service/http
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-05-04 23:07:30 +0300
committerWolfy-J <[email protected]>2019-05-04 23:07:30 +0300
commit3800c27ff9ec2641248d6dc2ce2f7ab56c237664 (patch)
treec8026df76f0fea5519f958d310210e1da46f369d /service/http
parent2afa417f4f46b31b79043e3e56513d51e4ad2fde (diff)
golint
Diffstat (limited to 'service/http')
-rw-r--r--service/http/service.go10
-rw-r--r--service/http/uploads_config.go2
2 files changed, 6 insertions, 6 deletions
diff --git a/service/http/service.go b/service/http/service.go
index 1239acca..8105d218 100644
--- a/service/http/service.go
+++ b/service/http/service.go
@@ -25,7 +25,7 @@ const (
// http middleware type.
type middleware func(f http.HandlerFunc) http.HandlerFunc
-// Services manages rr, http servers.
+// Service manages rr, http servers.
type Service struct {
cfg *Config
env env.Environment
@@ -39,8 +39,8 @@ type Service struct {
https *http.Server
}
-// AddController attaches controller. Currently only one controller is supported.
-func (s *Service) AddController(w roadrunner.Controller) {
+// Attach attaches controller. Currently only one controller is supported.
+func (s *Service) Attach(w roadrunner.Controller) {
s.controller = w
}
@@ -85,7 +85,7 @@ func (s *Service) Serve() error {
s.rr.Listen(s.throw)
if s.controller != nil {
- s.rr.Watch(s.controller)
+ s.rr.Attach(s.controller)
}
s.handler = &Handler{cfg: s.cfg, rr: s.rr}
@@ -113,7 +113,7 @@ func (s *Service) Serve() error {
return <-err
}
-// Detach stops the svc.
+// Stop stops the http.
func (s *Service) Stop() {
s.mu.Lock()
defer s.mu.Unlock()
diff --git a/service/http/uploads_config.go b/service/http/uploads_config.go
index 9f62d779..3f655064 100644
--- a/service/http/uploads_config.go
+++ b/service/http/uploads_config.go
@@ -31,7 +31,7 @@ func (cfg *UploadsConfig) TmpDir() string {
return os.TempDir()
}
-// AlwaysForbid must return true if file extension is not allowed for the upload.
+// Forbids must return true if file extension is not allowed for the upload.
func (cfg *UploadsConfig) Forbids(filename string) bool {
ext := strings.ToLower(path.Ext(filename))