Add debug to fucking links
This commit is contained in:
parent
c5704f9d10
commit
2bd6b8546f
|
@ -37,9 +37,20 @@ func (l *LinkCenter) AddLink(id uint16, link com.Link) error {
|
|||
}
|
||||
log.Printf("Added link by %s\n", string(link.Data))
|
||||
l.Mu.Unlock()
|
||||
l.debug()
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *LinkCenter) debug() {
|
||||
for val, key := range l.Links {
|
||||
if key == nil {
|
||||
log.Printf("DEBUG: LINKCENTER: VAL = %s LINK = NIL\n", val)
|
||||
continue
|
||||
}
|
||||
log.Printf("DEBUG: LINKCENTER: VAL = %s LINK = %v\n", val, *key)
|
||||
}
|
||||
}
|
||||
|
||||
func (l *LinkCenter) DeleteLink(data []byte) error {
|
||||
l.Mu.Lock()
|
||||
delete(l.Links, string(data))
|
||||
|
|
Loading…
Reference in New Issue
Block a user