Improve variable and struct attribute names

This commit is contained in:
2018-07-08 18:38:06 +01:00
parent f6e485a2a3
commit 2b9fece77f
2 changed files with 9 additions and 9 deletions

View File

@@ -8,20 +8,20 @@ import (
"sort"
)
func NewDump(file string) *Dump {
return &Dump{File: file}
func NewDump(filePath string) *Dump {
return &Dump{FilePath: filePath}
}
// Dump contains all relevant data for a single heap dump.
type Dump struct {
File string
Index []*string
Entries map[string]*Entry
FilePath string
Index []*string
Entries map[string]*Entry
}
// Process processes the heap dump
func (s *Dump) Process() error {
file, err := os.Open(s.File)
file, err := os.Open(s.FilePath)
defer file.Close()
if err != nil {
@@ -63,7 +63,7 @@ func (s *Dump) PrintEntryAddress(indexes []*string) {
}
func (s *Dump) PrintEntryJSON(indexes []*string) error {
file, err := os.Open(s.File)
file, err := os.Open(s.FilePath)
defer file.Close()
if err != nil {