summaryrefslogtreecommitdiffstats
path: root/extras/vpp_stats_fs
diff options
context:
space:
mode:
authorAdrian Villin <avillin@cisco.com>2024-06-11 10:32:08 +0200
committerDave Wallace <dwallacelf@gmail.com>2024-06-12 16:08:49 +0000
commit56387407c33f8aadc35b93d8c4e7b17b1b90a19e (patch)
tree4235ae3bedf091a3c8d781a3668b1310c6f18b75 /extras/vpp_stats_fs
parent7080294116708e4e6cc0e0c11db712956e82c14c (diff)
hs-test: added go style targets
- added checkstyle-go and fixstyle-go - comments in stats_fs.go were missing a space Type: make Change-Id: I520acab5ff61eaf9d0ccfd9425bdc41f74559198 Signed-off-by: Adrian Villin <avillin@cisco.com>
Diffstat (limited to 'extras/vpp_stats_fs')
-rw-r--r--extras/vpp_stats_fs/stats_fs.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/extras/vpp_stats_fs/stats_fs.go b/extras/vpp_stats_fs/stats_fs.go
index 80c15096234..7b0f1ec193f 100644
--- a/extras/vpp_stats_fs/stats_fs.go
+++ b/extras/vpp_stats_fs/stats_fs.go
@@ -132,7 +132,7 @@ func getCounterContent(index uint32, client *statsclient.StatsClient) (content s
return content, fs.OK
}
-//The dirNode structure represents directories
+// The dirNode structure represents directories
type dirNode struct {
fs.Inode
client *statsclient.StatsClient
@@ -175,7 +175,7 @@ func (dn *dirNode) Opendir(ctx context.Context) syscall.Errno {
return status
}
-//The statNode structure represents counters
+// The statNode structure represents counters
type statNode struct {
fs.Inode
client *statsclient.StatsClient
@@ -192,7 +192,7 @@ func (fh *statNode) Getattr(ctx context.Context, f fs.FileHandle, out *fuse.Attr
return 0
}
-//When a file is opened, the correpsonding counter value is dumped and a file handle is created
+// When a file is opened, the correpsonding counter value is dumped and a file handle is created
func (sn *statNode) Open(ctx context.Context, flags uint32) (fs.FileHandle, uint32, syscall.Errno) {
content, status := getCounterContent(sn.index, sn.client)
if status == syscall.ENOENT {
@@ -220,7 +220,7 @@ func (fh *statFH) Read(ctx context.Context, data []byte, off int64) (fuse.ReadRe
return fuse.ReadResultData(fh.data[off:end]), fs.OK
}
-//NewStatsFileSystem creates the fs for the stat segment.
+// NewStatsFileSystem creates the fs for the stat segment.
func NewStatsFileSystem(sc *statsclient.StatsClient) (root fs.InodeEmbedder, err error) {
return &dirNode{client: sc}, nil
}