[VOL-5054] - Triage build for voltha-openolt-adapter
cmd/*.go
internal/pkg/*.go
pkg/mocks/*.go
=================
o Run gofmt -w -s on all non-(vendor/) golang sources (~make lint).
o Release triage jobs have been failing on unrelated source problems.
config.mk
makefiles/docker/
makefiles/etc/
makefiles/targets/
makefiles/virtualenv.mk
=======================
o https://github.com/opencord/onf-make.git
o Copy in library makefiles, esp docker/include.mk
Makefile
========
o Refactor and replace inline GO= and docker macros with docker/include.
o Added manual flag LOCAL_FIX_PERMS=1 to grant docker image write access.
o Target: mod-update
- Split logic into targets mod-tidy and mod-vendor.
- Display a banner when target runs for readability.
- Target lint-mod now calls mod-update VS inlining make mod tidy & vendor
o Target: test
- Split logic into 3 distinct targets now that stdout/stderr handled.
- Improve error handling, fail early VS accumulating status then exit
- Display a banner when targets process for log readability.
- Define macros for *.out and *.xml to avoid repeating logfile paths.
Change-Id: Ia2eb999f6176ce2eb46e41f55aee74c05b5a4cd2
diff --git a/internal/pkg/core/statsmanager.go b/internal/pkg/core/statsmanager.go
index eedfa19..52a86e3 100755
--- a/internal/pkg/core/statsmanager.go
+++ b/internal/pkg/core/statsmanager.go
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-//Package core provides the utility for olt devices, flows and statistics
+// Package core provides the utility for olt devices, flows and statistics
package core
import (
@@ -99,8 +99,8 @@
var onuStats = make(chan *openolt.OnuStatistics, 100)
var gemStats = make(chan *openolt.GemPortStatistics, 100)
-//statRegInfo is used to register for notifications
-//on receiving port stats and flow stats indication
+// statRegInfo is used to register for notifications
+// on receiving port stats and flow stats indication
type statRegInfo struct {
chn chan bool
portNo uint32
@@ -256,7 +256,7 @@
return &NNI
}
-//StatType defines portStatsType and flowStatsType types
+// StatType defines portStatsType and flowStatsType types
type StatType int
const (
@@ -741,7 +741,7 @@
logger.Debugw(ctx, "updateGetOltPortCountersResponse", log.Fields{"resp": singleValResp})
}
-//RegisterForStatIndication registers ch as a channel on which indication is sent when statistics of type t is received
+// RegisterForStatIndication registers ch as a channel on which indication is sent when statistics of type t is received
func (StatMgr *OpenOltStatisticsMgr) RegisterForStatIndication(ctx context.Context, t StatType, ch chan bool, portNo uint32, portType extension.GetOltPortCounters_PortType) {
statInd := statRegInfo{
chn: ch,
@@ -756,7 +756,7 @@
}
-//DeRegisterFromStatIndication removes the previously registered channel ch for type t of statistics
+// DeRegisterFromStatIndication removes the previously registered channel ch for type t of statistics
func (StatMgr *OpenOltStatisticsMgr) DeRegisterFromStatIndication(ctx context.Context, t StatType, ch chan bool) {
StatMgr.statIndListnerMu.Lock()
defer StatMgr.statIndListnerMu.Unlock()