commit 937b369fbcbee3c70e3cbe32e104d95cc338bc4c
parent fcb611ba345d811aa159e82ff27e780f03af9066
Author: Matsuda Kenji <info@mtkn.jp>
Date: Mon, 6 Nov 2023 08:58:44 +0900
modify FidPool.String
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fid.go b/fid.go
@@ -91,17 +91,17 @@ func (pool *FidPool) delete(fid uint32) {
func (pool *FidPool) String() string {
pool.lock.Lock() // TODO: need?
defer pool.lock.Unlock()
- s := "{"
+ s := "&FidPool{\n"
for fnum, fstruct := range pool.m {
if fstruct.File == nil {
- s += fmt.Sprintf(" [%d]<nil>", fnum)
+ s += fmt.Sprintf(" %d: <nil>\n", fnum)
continue
}
st, err := fstruct.File.Stat()
if err != nil {
panic(err)
}
- s += fmt.Sprintf(" [%d]%v", fnum, st.Name())
+ s += fmt.Sprintf(" %d: %v\n", fnum, st.Sys().(*Stat))
}
s += "}"
return s