mirror of
https://github.com/jimeh/rbheap.git
synced 2026-02-19 12:56:46 +00:00
Improve variable and struct attribute names
This commit is contained in:
@@ -7,9 +7,9 @@ import (
|
|||||||
"github.com/jimeh/rbheap/obj"
|
"github.com/jimeh/rbheap/obj"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewFinder(file1, file2, file3 string) *Finder {
|
func NewFinder(filePath1, filePath2, filePath3 string) *Finder {
|
||||||
return &Finder{
|
return &Finder{
|
||||||
FilePaths: [3]string{file1, file2, file3},
|
FilePaths: [3]string{filePath1, filePath2, filePath3},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
14
obj/dump.go
14
obj/dump.go
@@ -8,20 +8,20 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
)
|
)
|
||||||
|
|
||||||
func NewDump(file string) *Dump {
|
func NewDump(filePath string) *Dump {
|
||||||
return &Dump{File: file}
|
return &Dump{FilePath: filePath}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dump contains all relevant data for a single heap dump.
|
// Dump contains all relevant data for a single heap dump.
|
||||||
type Dump struct {
|
type Dump struct {
|
||||||
File string
|
FilePath string
|
||||||
Index []*string
|
Index []*string
|
||||||
Entries map[string]*Entry
|
Entries map[string]*Entry
|
||||||
}
|
}
|
||||||
|
|
||||||
// Process processes the heap dump
|
// Process processes the heap dump
|
||||||
func (s *Dump) Process() error {
|
func (s *Dump) Process() error {
|
||||||
file, err := os.Open(s.File)
|
file, err := os.Open(s.FilePath)
|
||||||
defer file.Close()
|
defer file.Close()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -63,7 +63,7 @@ func (s *Dump) PrintEntryAddress(indexes []*string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *Dump) PrintEntryJSON(indexes []*string) error {
|
func (s *Dump) PrintEntryJSON(indexes []*string) error {
|
||||||
file, err := os.Open(s.File)
|
file, err := os.Open(s.FilePath)
|
||||||
defer file.Close()
|
defer file.Close()
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
Reference in New Issue
Block a user