From 9b345355de117855f42e58391ab2c87b48143451 Mon Sep 17 00:00:00 2001 From: Michael Li Date: Fri, 25 Aug 2023 23:36:57 +0800 Subject: [PATCH 1/2] remove log in http client implement --- pkg/http/client.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/http/client.go b/pkg/http/client.go index d65bd116..399135d3 100644 --- a/pkg/http/client.go +++ b/pkg/http/client.go @@ -55,11 +55,11 @@ func (s *wormClient) Do(req *http.Request, fn ResponseFn) { item := &requestItem{req, fn} select { case s.requestCh <- item: - logrus.Debugln("simepleClient.Do send request item by requestCh chan") + // simepleClient.Do send request item by requestCh chan default: select { case s.requestTempCh <- item: - logrus.Debugln("simepleClient.Do send request item by requestTempCh chan") + // simepleClient.Do send request item by requestTempCh chan" default: go func() { s.do(item) From 1f6be9ac6a543d0e83a83dfbbf04cf40fdc9f30b Mon Sep 17 00:00:00 2001 From: Michael Li Date: Fri, 25 Aug 2023 23:40:04 +0800 Subject: [PATCH 2/2] update pkg/http package license comment --- pkg/http/client.go | 10 +++++----- pkg/http/http.go | 6 +++--- pkg/http/http_suite_test.go | 6 +++--- pkg/http/mux.go | 6 +++--- pkg/http/mux_test.go | 6 +++--- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pkg/http/client.go b/pkg/http/client.go index 399135d3..6af18377 100644 --- a/pkg/http/client.go +++ b/pkg/http/client.go @@ -1,6 +1,6 @@ -// Copyright 2023 Michael Li . All rights reserved. -// Use of this source code is governed by Apache License 2.0 that -// can be found in the LICENSE file. +// Copyright 2023 ROC. All rights reserved. +// Use of this source code is governed by a MIT style +// license that can be found in the LICENSE file. package http @@ -55,11 +55,11 @@ func (s *wormClient) Do(req *http.Request, fn ResponseFn) { item := &requestItem{req, fn} select { case s.requestCh <- item: - // simepleClient.Do send request item by requestCh chan + // send request item by requestCh chan default: select { case s.requestTempCh <- item: - // simepleClient.Do send request item by requestTempCh chan" + // send request item by requestTempCh chan" default: go func() { s.do(item) diff --git a/pkg/http/http.go b/pkg/http/http.go index 08876448..86e5035b 100644 --- a/pkg/http/http.go +++ b/pkg/http/http.go @@ -1,6 +1,6 @@ -// Copyright 2023 Michael Li . All rights reserved. -// Use of this source code is governed by Apache License 2.0 that -// can be found in the LICENSE file. +// Copyright 2023 ROC. All rights reserved. +// Use of this source code is governed by a MIT style +// license that can be found in the LICENSE file. // package http contain some custom help function for std http library. diff --git a/pkg/http/http_suite_test.go b/pkg/http/http_suite_test.go index ef72f36b..b2594602 100644 --- a/pkg/http/http_suite_test.go +++ b/pkg/http/http_suite_test.go @@ -1,6 +1,6 @@ -// Copyright 2023 Michael Li . All rights reserved. -// Use of this source code is governed by Apache License 2.0 that -// can be found in the LICENSE file. +// Copyright 2023 ROC. All rights reserved. +// Use of this source code is governed by a MIT style +// license that can be found in the LICENSE file. package http_test diff --git a/pkg/http/mux.go b/pkg/http/mux.go index 46a76b02..caf184b4 100644 --- a/pkg/http/mux.go +++ b/pkg/http/mux.go @@ -1,6 +1,6 @@ -// Copyright 2023 Michael Li . All rights reserved. -// Use of this source code is governed by Apache License 2.0 that -// can be found in the LICENSE file. +// Copyright 2023 ROC. All rights reserved. +// Use of this source code is governed by a MIT style +// license that can be found in the LICENSE file. package http diff --git a/pkg/http/mux_test.go b/pkg/http/mux_test.go index e67d5f47..eb6db568 100644 --- a/pkg/http/mux_test.go +++ b/pkg/http/mux_test.go @@ -1,6 +1,6 @@ -// Copyright 2023 Michael Li . All rights reserved. -// Use of this source code is governed by Apache License 2.0 that -// can be found in the LICENSE file. +// Copyright 2023 ROC. All rights reserved. +// Use of this source code is governed by a MIT style +// license that can be found in the LICENSE file. package http