Skip to content

Commit

Permalink
Add comments for go ci lint
Browse files Browse the repository at this point in the history
  • Loading branch information
becheran committed Mar 27, 2021
1 parent affa24c commit 8a4076a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ import (
"github.com/becheran/roumon/internal/model"
)

// Client for pprof events
type Client struct {
c *http.Client
server string
}

// NewClient creates a new client listening for pprof events
func NewClient(ip string, port int) *Client {
server := fmt.Sprintf("http://%s:%d/debug/pprof/goroutine?debug=2", ip, port)
log.Printf("Attach to server %s\n", server)
Expand All @@ -24,6 +26,7 @@ func NewClient(ip string, port int) *Client {
}
}

// Run starts the client and listen for incoming routine changes
func (client *Client) Run(terminate chan<- error, routineUpdate chan<- []model.Goroutine) {
ticker := time.NewTicker(time.Second * 1)
defer ticker.Stop()
Expand Down
2 changes: 2 additions & 0 deletions internal/ui/ui.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const (
keepRoutineHist = 100
)

// UI contains all user interface elements
type UI struct {
list *widgets.List
filter *widgets.Paragraph
Expand All @@ -35,6 +36,7 @@ type UI struct {
filteredData []model.Goroutine
}

// NewUI creates a new console user interface
func NewUI() *UI {
if err := termui.Init(); err != nil {
log.Fatalf("Failed to initialize termui: %v", err)
Expand Down

0 comments on commit 8a4076a

Please sign in to comment.