id
int32
0
167k
repo
stringlengths
5
54
path
stringlengths
4
155
func_name
stringlengths
1
118
original_string
stringlengths
52
85.5k
language
stringclasses
1 value
code
stringlengths
52
85.5k
code_tokens
listlengths
21
1.41k
docstring
stringlengths
6
2.61k
docstring_tokens
listlengths
3
215
sha
stringlengths
40
40
url
stringlengths
85
252
127,800
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_PredictionResult
func (c *Callbacks) OnCDOTAUserMsg_PredictionResult(fn func(*dota.CDOTAUserMsg_PredictionResult) error) { c.onCDOTAUserMsg_PredictionResult = append(c.onCDOTAUserMsg_PredictionResult, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_PredictionResult(fn func(*dota.CDOTAUserMsg_PredictionResult) error) { c.onCDOTAUserMsg_PredictionResult = append(c.onCDOTAUserMsg_PredictionResult, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_PredictionResult", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_PredictionResult", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_PredictionResult", "=", "append", "(", "c", ".", "onCDOTAUser...
// OnCDOTAUserMsg_PredictionResult registers a callback for EDotaUserMessages_DOTA_UM_PredictionResult
[ "OnCDOTAUserMsg_PredictionResult", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_PredictionResult" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1136-L1138
127,801
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_ModifierAlert
func (c *Callbacks) OnCDOTAUserMsg_ModifierAlert(fn func(*dota.CDOTAUserMsg_ModifierAlert) error) { c.onCDOTAUserMsg_ModifierAlert = append(c.onCDOTAUserMsg_ModifierAlert, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_ModifierAlert(fn func(*dota.CDOTAUserMsg_ModifierAlert) error) { c.onCDOTAUserMsg_ModifierAlert = append(c.onCDOTAUserMsg_ModifierAlert, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_ModifierAlert", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_ModifierAlert", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_ModifierAlert", "=", "append", "(", "c", ".", "onCDOTAUserMsg_Modif...
// OnCDOTAUserMsg_ModifierAlert registers a callback for EDotaUserMessages_DOTA_UM_ModifierAlert
[ "OnCDOTAUserMsg_ModifierAlert", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_ModifierAlert" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1141-L1143
127,802
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_HPManaAlert
func (c *Callbacks) OnCDOTAUserMsg_HPManaAlert(fn func(*dota.CDOTAUserMsg_HPManaAlert) error) { c.onCDOTAUserMsg_HPManaAlert = append(c.onCDOTAUserMsg_HPManaAlert, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_HPManaAlert(fn func(*dota.CDOTAUserMsg_HPManaAlert) error) { c.onCDOTAUserMsg_HPManaAlert = append(c.onCDOTAUserMsg_HPManaAlert, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_HPManaAlert", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_HPManaAlert", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_HPManaAlert", "=", "append", "(", "c", ".", "onCDOTAUserMsg_HPManaAlert...
// OnCDOTAUserMsg_HPManaAlert registers a callback for EDotaUserMessages_DOTA_UM_HPManaAlert
[ "OnCDOTAUserMsg_HPManaAlert", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_HPManaAlert" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1146-L1148
127,803
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_GlyphAlert
func (c *Callbacks) OnCDOTAUserMsg_GlyphAlert(fn func(*dota.CDOTAUserMsg_GlyphAlert) error) { c.onCDOTAUserMsg_GlyphAlert = append(c.onCDOTAUserMsg_GlyphAlert, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_GlyphAlert(fn func(*dota.CDOTAUserMsg_GlyphAlert) error) { c.onCDOTAUserMsg_GlyphAlert = append(c.onCDOTAUserMsg_GlyphAlert, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_GlyphAlert", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_GlyphAlert", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_GlyphAlert", "=", "append", "(", "c", ".", "onCDOTAUserMsg_GlyphAlert", ...
// OnCDOTAUserMsg_GlyphAlert registers a callback for EDotaUserMessages_DOTA_UM_GlyphAlert
[ "OnCDOTAUserMsg_GlyphAlert", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_GlyphAlert" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1151-L1153
127,804
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_BeastChat
func (c *Callbacks) OnCDOTAUserMsg_BeastChat(fn func(*dota.CDOTAUserMsg_BeastChat) error) { c.onCDOTAUserMsg_BeastChat = append(c.onCDOTAUserMsg_BeastChat, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_BeastChat(fn func(*dota.CDOTAUserMsg_BeastChat) error) { c.onCDOTAUserMsg_BeastChat = append(c.onCDOTAUserMsg_BeastChat, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_BeastChat", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_BeastChat", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_BeastChat", "=", "append", "(", "c", ".", "onCDOTAUserMsg_BeastChat", ","...
// OnCDOTAUserMsg_BeastChat registers a callback for EDotaUserMessages_DOTA_UM_BeastChat
[ "OnCDOTAUserMsg_BeastChat", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_BeastChat" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1156-L1158
127,805
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_SpectatorPlayerUnitOrders
func (c *Callbacks) OnCDOTAUserMsg_SpectatorPlayerUnitOrders(fn func(*dota.CDOTAUserMsg_SpectatorPlayerUnitOrders) error) { c.onCDOTAUserMsg_SpectatorPlayerUnitOrders = append(c.onCDOTAUserMsg_SpectatorPlayerUnitOrders, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_SpectatorPlayerUnitOrders(fn func(*dota.CDOTAUserMsg_SpectatorPlayerUnitOrders) error) { c.onCDOTAUserMsg_SpectatorPlayerUnitOrders = append(c.onCDOTAUserMsg_SpectatorPlayerUnitOrders, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_SpectatorPlayerUnitOrders", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_SpectatorPlayerUnitOrders", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_SpectatorPlayerUnitOrders", "=", "append", "(", ...
// OnCDOTAUserMsg_SpectatorPlayerUnitOrders registers a callback for EDotaUserMessages_DOTA_UM_SpectatorPlayerUnitOrders
[ "OnCDOTAUserMsg_SpectatorPlayerUnitOrders", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_SpectatorPlayerUnitOrders" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1161-L1163
127,806
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_CustomHudElement_Create
func (c *Callbacks) OnCDOTAUserMsg_CustomHudElement_Create(fn func(*dota.CDOTAUserMsg_CustomHudElement_Create) error) { c.onCDOTAUserMsg_CustomHudElement_Create = append(c.onCDOTAUserMsg_CustomHudElement_Create, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_CustomHudElement_Create(fn func(*dota.CDOTAUserMsg_CustomHudElement_Create) error) { c.onCDOTAUserMsg_CustomHudElement_Create = append(c.onCDOTAUserMsg_CustomHudElement_Create, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_CustomHudElement_Create", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_CustomHudElement_Create", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_CustomHudElement_Create", "=", "append", "(", "c", ...
// OnCDOTAUserMsg_CustomHudElement_Create registers a callback for EDotaUserMessages_DOTA_UM_CustomHudElement_Create
[ "OnCDOTAUserMsg_CustomHudElement_Create", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_CustomHudElement_Create" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1166-L1168
127,807
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_CustomHudElement_Modify
func (c *Callbacks) OnCDOTAUserMsg_CustomHudElement_Modify(fn func(*dota.CDOTAUserMsg_CustomHudElement_Modify) error) { c.onCDOTAUserMsg_CustomHudElement_Modify = append(c.onCDOTAUserMsg_CustomHudElement_Modify, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_CustomHudElement_Modify(fn func(*dota.CDOTAUserMsg_CustomHudElement_Modify) error) { c.onCDOTAUserMsg_CustomHudElement_Modify = append(c.onCDOTAUserMsg_CustomHudElement_Modify, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_CustomHudElement_Modify", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_CustomHudElement_Modify", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_CustomHudElement_Modify", "=", "append", "(", "c", ...
// OnCDOTAUserMsg_CustomHudElement_Modify registers a callback for EDotaUserMessages_DOTA_UM_CustomHudElement_Modify
[ "OnCDOTAUserMsg_CustomHudElement_Modify", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_CustomHudElement_Modify" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1171-L1173
127,808
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_CustomHudElement_Destroy
func (c *Callbacks) OnCDOTAUserMsg_CustomHudElement_Destroy(fn func(*dota.CDOTAUserMsg_CustomHudElement_Destroy) error) { c.onCDOTAUserMsg_CustomHudElement_Destroy = append(c.onCDOTAUserMsg_CustomHudElement_Destroy, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_CustomHudElement_Destroy(fn func(*dota.CDOTAUserMsg_CustomHudElement_Destroy) error) { c.onCDOTAUserMsg_CustomHudElement_Destroy = append(c.onCDOTAUserMsg_CustomHudElement_Destroy, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_CustomHudElement_Destroy", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_CustomHudElement_Destroy", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_CustomHudElement_Destroy", "=", "append", "(", "c...
// OnCDOTAUserMsg_CustomHudElement_Destroy registers a callback for EDotaUserMessages_DOTA_UM_CustomHudElement_Destroy
[ "OnCDOTAUserMsg_CustomHudElement_Destroy", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_CustomHudElement_Destroy" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1176-L1178
127,809
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_CompendiumState
func (c *Callbacks) OnCDOTAUserMsg_CompendiumState(fn func(*dota.CDOTAUserMsg_CompendiumState) error) { c.onCDOTAUserMsg_CompendiumState = append(c.onCDOTAUserMsg_CompendiumState, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_CompendiumState(fn func(*dota.CDOTAUserMsg_CompendiumState) error) { c.onCDOTAUserMsg_CompendiumState = append(c.onCDOTAUserMsg_CompendiumState, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_CompendiumState", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_CompendiumState", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_CompendiumState", "=", "append", "(", "c", ".", "onCDOTAUserMsg...
// OnCDOTAUserMsg_CompendiumState registers a callback for EDotaUserMessages_DOTA_UM_CompendiumState
[ "OnCDOTAUserMsg_CompendiumState", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_CompendiumState" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1181-L1183
127,810
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_ProjectionAbility
func (c *Callbacks) OnCDOTAUserMsg_ProjectionAbility(fn func(*dota.CDOTAUserMsg_ProjectionAbility) error) { c.onCDOTAUserMsg_ProjectionAbility = append(c.onCDOTAUserMsg_ProjectionAbility, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_ProjectionAbility(fn func(*dota.CDOTAUserMsg_ProjectionAbility) error) { c.onCDOTAUserMsg_ProjectionAbility = append(c.onCDOTAUserMsg_ProjectionAbility, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_ProjectionAbility", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_ProjectionAbility", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_ProjectionAbility", "=", "append", "(", "c", ".", "onCDOTAU...
// OnCDOTAUserMsg_ProjectionAbility registers a callback for EDotaUserMessages_DOTA_UM_ProjectionAbility
[ "OnCDOTAUserMsg_ProjectionAbility", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_ProjectionAbility" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1186-L1188
127,811
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_ProjectionEvent
func (c *Callbacks) OnCDOTAUserMsg_ProjectionEvent(fn func(*dota.CDOTAUserMsg_ProjectionEvent) error) { c.onCDOTAUserMsg_ProjectionEvent = append(c.onCDOTAUserMsg_ProjectionEvent, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_ProjectionEvent(fn func(*dota.CDOTAUserMsg_ProjectionEvent) error) { c.onCDOTAUserMsg_ProjectionEvent = append(c.onCDOTAUserMsg_ProjectionEvent, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_ProjectionEvent", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_ProjectionEvent", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_ProjectionEvent", "=", "append", "(", "c", ".", "onCDOTAUserMsg...
// OnCDOTAUserMsg_ProjectionEvent registers a callback for EDotaUserMessages_DOTA_UM_ProjectionEvent
[ "OnCDOTAUserMsg_ProjectionEvent", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_ProjectionEvent" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1191-L1193
127,812
dotabuff/manta
callbacks.go
OnCMsgDOTACombatLogEntry
func (c *Callbacks) OnCMsgDOTACombatLogEntry(fn func(*dota.CMsgDOTACombatLogEntry) error) { c.onCMsgDOTACombatLogEntry = append(c.onCMsgDOTACombatLogEntry, fn) }
go
func (c *Callbacks) OnCMsgDOTACombatLogEntry(fn func(*dota.CMsgDOTACombatLogEntry) error) { c.onCMsgDOTACombatLogEntry = append(c.onCMsgDOTACombatLogEntry, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCMsgDOTACombatLogEntry", "(", "fn", "func", "(", "*", "dota", ".", "CMsgDOTACombatLogEntry", ")", "error", ")", "{", "c", ".", "onCMsgDOTACombatLogEntry", "=", "append", "(", "c", ".", "onCMsgDOTACombatLogEntry", ","...
// OnCMsgDOTACombatLogEntry registers a callback for EDotaUserMessages_DOTA_UM_CombatLogDataHLTV
[ "OnCMsgDOTACombatLogEntry", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_CombatLogDataHLTV" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1196-L1198
127,813
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_XPAlert
func (c *Callbacks) OnCDOTAUserMsg_XPAlert(fn func(*dota.CDOTAUserMsg_XPAlert) error) { c.onCDOTAUserMsg_XPAlert = append(c.onCDOTAUserMsg_XPAlert, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_XPAlert(fn func(*dota.CDOTAUserMsg_XPAlert) error) { c.onCDOTAUserMsg_XPAlert = append(c.onCDOTAUserMsg_XPAlert, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_XPAlert", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_XPAlert", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_XPAlert", "=", "append", "(", "c", ".", "onCDOTAUserMsg_XPAlert", ",", "fn"...
// OnCDOTAUserMsg_XPAlert registers a callback for EDotaUserMessages_DOTA_UM_XPAlert
[ "OnCDOTAUserMsg_XPAlert", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_XPAlert" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1201-L1203
127,814
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_UpdateQuestProgress
func (c *Callbacks) OnCDOTAUserMsg_UpdateQuestProgress(fn func(*dota.CDOTAUserMsg_UpdateQuestProgress) error) { c.onCDOTAUserMsg_UpdateQuestProgress = append(c.onCDOTAUserMsg_UpdateQuestProgress, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_UpdateQuestProgress(fn func(*dota.CDOTAUserMsg_UpdateQuestProgress) error) { c.onCDOTAUserMsg_UpdateQuestProgress = append(c.onCDOTAUserMsg_UpdateQuestProgress, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_UpdateQuestProgress", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_UpdateQuestProgress", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_UpdateQuestProgress", "=", "append", "(", "c", ".", "on...
// OnCDOTAUserMsg_UpdateQuestProgress registers a callback for EDotaUserMessages_DOTA_UM_UpdateQuestProgress
[ "OnCDOTAUserMsg_UpdateQuestProgress", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_UpdateQuestProgress" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1206-L1208
127,815
dotabuff/manta
callbacks.go
OnCDOTAMatchMetadataFile
func (c *Callbacks) OnCDOTAMatchMetadataFile(fn func(*dota.CDOTAMatchMetadataFile) error) { c.onCDOTAMatchMetadataFile = append(c.onCDOTAMatchMetadataFile, fn) }
go
func (c *Callbacks) OnCDOTAMatchMetadataFile(fn func(*dota.CDOTAMatchMetadataFile) error) { c.onCDOTAMatchMetadataFile = append(c.onCDOTAMatchMetadataFile, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAMatchMetadataFile", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAMatchMetadataFile", ")", "error", ")", "{", "c", ".", "onCDOTAMatchMetadataFile", "=", "append", "(", "c", ".", "onCDOTAMatchMetadataFile", ","...
// OnCDOTAMatchMetadataFile registers a callback for EDotaUserMessages_DOTA_UM_MatchMetadata
[ "OnCDOTAMatchMetadataFile", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_MatchMetadata" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1211-L1213
127,816
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_QuestStatus
func (c *Callbacks) OnCDOTAUserMsg_QuestStatus(fn func(*dota.CDOTAUserMsg_QuestStatus) error) { c.onCDOTAUserMsg_QuestStatus = append(c.onCDOTAUserMsg_QuestStatus, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_QuestStatus(fn func(*dota.CDOTAUserMsg_QuestStatus) error) { c.onCDOTAUserMsg_QuestStatus = append(c.onCDOTAUserMsg_QuestStatus, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_QuestStatus", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_QuestStatus", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_QuestStatus", "=", "append", "(", "c", ".", "onCDOTAUserMsg_QuestStatus...
// OnCDOTAUserMsg_QuestStatus registers a callback for EDotaUserMessages_DOTA_UM_QuestStatus
[ "OnCDOTAUserMsg_QuestStatus", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_QuestStatus" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1216-L1218
127,817
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_SuggestHeroPick
func (c *Callbacks) OnCDOTAUserMsg_SuggestHeroPick(fn func(*dota.CDOTAUserMsg_SuggestHeroPick) error) { c.onCDOTAUserMsg_SuggestHeroPick = append(c.onCDOTAUserMsg_SuggestHeroPick, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_SuggestHeroPick(fn func(*dota.CDOTAUserMsg_SuggestHeroPick) error) { c.onCDOTAUserMsg_SuggestHeroPick = append(c.onCDOTAUserMsg_SuggestHeroPick, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_SuggestHeroPick", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_SuggestHeroPick", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_SuggestHeroPick", "=", "append", "(", "c", ".", "onCDOTAUserMsg...
// OnCDOTAUserMsg_SuggestHeroPick registers a callback for EDotaUserMessages_DOTA_UM_SuggestHeroPick
[ "OnCDOTAUserMsg_SuggestHeroPick", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_SuggestHeroPick" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1221-L1223
127,818
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_SuggestHeroRole
func (c *Callbacks) OnCDOTAUserMsg_SuggestHeroRole(fn func(*dota.CDOTAUserMsg_SuggestHeroRole) error) { c.onCDOTAUserMsg_SuggestHeroRole = append(c.onCDOTAUserMsg_SuggestHeroRole, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_SuggestHeroRole(fn func(*dota.CDOTAUserMsg_SuggestHeroRole) error) { c.onCDOTAUserMsg_SuggestHeroRole = append(c.onCDOTAUserMsg_SuggestHeroRole, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_SuggestHeroRole", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_SuggestHeroRole", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_SuggestHeroRole", "=", "append", "(", "c", ".", "onCDOTAUserMsg...
// OnCDOTAUserMsg_SuggestHeroRole registers a callback for EDotaUserMessages_DOTA_UM_SuggestHeroRole
[ "OnCDOTAUserMsg_SuggestHeroRole", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_SuggestHeroRole" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1226-L1228
127,819
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_KillcamDamageTaken
func (c *Callbacks) OnCDOTAUserMsg_KillcamDamageTaken(fn func(*dota.CDOTAUserMsg_KillcamDamageTaken) error) { c.onCDOTAUserMsg_KillcamDamageTaken = append(c.onCDOTAUserMsg_KillcamDamageTaken, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_KillcamDamageTaken(fn func(*dota.CDOTAUserMsg_KillcamDamageTaken) error) { c.onCDOTAUserMsg_KillcamDamageTaken = append(c.onCDOTAUserMsg_KillcamDamageTaken, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_KillcamDamageTaken", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_KillcamDamageTaken", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_KillcamDamageTaken", "=", "append", "(", "c", ".", "onCDO...
// OnCDOTAUserMsg_KillcamDamageTaken registers a callback for EDotaUserMessages_DOTA_UM_KillcamDamageTaken
[ "OnCDOTAUserMsg_KillcamDamageTaken", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_KillcamDamageTaken" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1231-L1233
127,820
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_SelectPenaltyGold
func (c *Callbacks) OnCDOTAUserMsg_SelectPenaltyGold(fn func(*dota.CDOTAUserMsg_SelectPenaltyGold) error) { c.onCDOTAUserMsg_SelectPenaltyGold = append(c.onCDOTAUserMsg_SelectPenaltyGold, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_SelectPenaltyGold(fn func(*dota.CDOTAUserMsg_SelectPenaltyGold) error) { c.onCDOTAUserMsg_SelectPenaltyGold = append(c.onCDOTAUserMsg_SelectPenaltyGold, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_SelectPenaltyGold", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_SelectPenaltyGold", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_SelectPenaltyGold", "=", "append", "(", "c", ".", "onCDOTAU...
// OnCDOTAUserMsg_SelectPenaltyGold registers a callback for EDotaUserMessages_DOTA_UM_SelectPenaltyGold
[ "OnCDOTAUserMsg_SelectPenaltyGold", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_SelectPenaltyGold" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1236-L1238
127,821
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_RollDiceResult
func (c *Callbacks) OnCDOTAUserMsg_RollDiceResult(fn func(*dota.CDOTAUserMsg_RollDiceResult) error) { c.onCDOTAUserMsg_RollDiceResult = append(c.onCDOTAUserMsg_RollDiceResult, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_RollDiceResult(fn func(*dota.CDOTAUserMsg_RollDiceResult) error) { c.onCDOTAUserMsg_RollDiceResult = append(c.onCDOTAUserMsg_RollDiceResult, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_RollDiceResult", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_RollDiceResult", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_RollDiceResult", "=", "append", "(", "c", ".", "onCDOTAUserMsg_Ro...
// OnCDOTAUserMsg_RollDiceResult registers a callback for EDotaUserMessages_DOTA_UM_RollDiceResult
[ "OnCDOTAUserMsg_RollDiceResult", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_RollDiceResult" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1241-L1243
127,822
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_FlipCoinResult
func (c *Callbacks) OnCDOTAUserMsg_FlipCoinResult(fn func(*dota.CDOTAUserMsg_FlipCoinResult) error) { c.onCDOTAUserMsg_FlipCoinResult = append(c.onCDOTAUserMsg_FlipCoinResult, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_FlipCoinResult(fn func(*dota.CDOTAUserMsg_FlipCoinResult) error) { c.onCDOTAUserMsg_FlipCoinResult = append(c.onCDOTAUserMsg_FlipCoinResult, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_FlipCoinResult", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_FlipCoinResult", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_FlipCoinResult", "=", "append", "(", "c", ".", "onCDOTAUserMsg_Fl...
// OnCDOTAUserMsg_FlipCoinResult registers a callback for EDotaUserMessages_DOTA_UM_FlipCoinResult
[ "OnCDOTAUserMsg_FlipCoinResult", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_FlipCoinResult" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1246-L1248
127,823
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_SendRoshanSpectatorPhase
func (c *Callbacks) OnCDOTAUserMsg_SendRoshanSpectatorPhase(fn func(*dota.CDOTAUserMsg_SendRoshanSpectatorPhase) error) { c.onCDOTAUserMsg_SendRoshanSpectatorPhase = append(c.onCDOTAUserMsg_SendRoshanSpectatorPhase, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_SendRoshanSpectatorPhase(fn func(*dota.CDOTAUserMsg_SendRoshanSpectatorPhase) error) { c.onCDOTAUserMsg_SendRoshanSpectatorPhase = append(c.onCDOTAUserMsg_SendRoshanSpectatorPhase, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_SendRoshanSpectatorPhase", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_SendRoshanSpectatorPhase", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_SendRoshanSpectatorPhase", "=", "append", "(", "c...
// OnCDOTAUserMsg_SendRoshanSpectatorPhase registers a callback for EDotaUserMessages_DOTA_UM_SendRoshanSpectatorPhase
[ "OnCDOTAUserMsg_SendRoshanSpectatorPhase", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_SendRoshanSpectatorPhase" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1251-L1253
127,824
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_ChatWheelCooldown
func (c *Callbacks) OnCDOTAUserMsg_ChatWheelCooldown(fn func(*dota.CDOTAUserMsg_ChatWheelCooldown) error) { c.onCDOTAUserMsg_ChatWheelCooldown = append(c.onCDOTAUserMsg_ChatWheelCooldown, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_ChatWheelCooldown(fn func(*dota.CDOTAUserMsg_ChatWheelCooldown) error) { c.onCDOTAUserMsg_ChatWheelCooldown = append(c.onCDOTAUserMsg_ChatWheelCooldown, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_ChatWheelCooldown", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_ChatWheelCooldown", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_ChatWheelCooldown", "=", "append", "(", "c", ".", "onCDOTAU...
// OnCDOTAUserMsg_ChatWheelCooldown registers a callback for EDotaUserMessages_DOTA_UM_ChatWheelCooldown
[ "OnCDOTAUserMsg_ChatWheelCooldown", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_ChatWheelCooldown" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1256-L1258
127,825
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_DismissAllStatPopups
func (c *Callbacks) OnCDOTAUserMsg_DismissAllStatPopups(fn func(*dota.CDOTAUserMsg_DismissAllStatPopups) error) { c.onCDOTAUserMsg_DismissAllStatPopups = append(c.onCDOTAUserMsg_DismissAllStatPopups, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_DismissAllStatPopups(fn func(*dota.CDOTAUserMsg_DismissAllStatPopups) error) { c.onCDOTAUserMsg_DismissAllStatPopups = append(c.onCDOTAUserMsg_DismissAllStatPopups, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_DismissAllStatPopups", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_DismissAllStatPopups", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_DismissAllStatPopups", "=", "append", "(", "c", ".", ...
// OnCDOTAUserMsg_DismissAllStatPopups registers a callback for EDotaUserMessages_DOTA_UM_DismissAllStatPopups
[ "OnCDOTAUserMsg_DismissAllStatPopups", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_DismissAllStatPopups" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1261-L1263
127,826
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_TE_DestroyProjectile
func (c *Callbacks) OnCDOTAUserMsg_TE_DestroyProjectile(fn func(*dota.CDOTAUserMsg_TE_DestroyProjectile) error) { c.onCDOTAUserMsg_TE_DestroyProjectile = append(c.onCDOTAUserMsg_TE_DestroyProjectile, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_TE_DestroyProjectile(fn func(*dota.CDOTAUserMsg_TE_DestroyProjectile) error) { c.onCDOTAUserMsg_TE_DestroyProjectile = append(c.onCDOTAUserMsg_TE_DestroyProjectile, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_TE_DestroyProjectile", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_TE_DestroyProjectile", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_TE_DestroyProjectile", "=", "append", "(", "c", ".", ...
// OnCDOTAUserMsg_TE_DestroyProjectile registers a callback for EDotaUserMessages_DOTA_UM_TE_DestroyProjectile
[ "OnCDOTAUserMsg_TE_DestroyProjectile", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_TE_DestroyProjectile" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1266-L1268
127,827
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_HeroRelicProgress
func (c *Callbacks) OnCDOTAUserMsg_HeroRelicProgress(fn func(*dota.CDOTAUserMsg_HeroRelicProgress) error) { c.onCDOTAUserMsg_HeroRelicProgress = append(c.onCDOTAUserMsg_HeroRelicProgress, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_HeroRelicProgress(fn func(*dota.CDOTAUserMsg_HeroRelicProgress) error) { c.onCDOTAUserMsg_HeroRelicProgress = append(c.onCDOTAUserMsg_HeroRelicProgress, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_HeroRelicProgress", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_HeroRelicProgress", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_HeroRelicProgress", "=", "append", "(", "c", ".", "onCDOTAU...
// OnCDOTAUserMsg_HeroRelicProgress registers a callback for EDotaUserMessages_DOTA_UM_HeroRelicProgress
[ "OnCDOTAUserMsg_HeroRelicProgress", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_HeroRelicProgress" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1271-L1273
127,828
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_AbilityDraftRequestAbility
func (c *Callbacks) OnCDOTAUserMsg_AbilityDraftRequestAbility(fn func(*dota.CDOTAUserMsg_AbilityDraftRequestAbility) error) { c.onCDOTAUserMsg_AbilityDraftRequestAbility = append(c.onCDOTAUserMsg_AbilityDraftRequestAbility, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_AbilityDraftRequestAbility(fn func(*dota.CDOTAUserMsg_AbilityDraftRequestAbility) error) { c.onCDOTAUserMsg_AbilityDraftRequestAbility = append(c.onCDOTAUserMsg_AbilityDraftRequestAbility, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_AbilityDraftRequestAbility", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_AbilityDraftRequestAbility", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_AbilityDraftRequestAbility", "=", "append", "("...
// OnCDOTAUserMsg_AbilityDraftRequestAbility registers a callback for EDotaUserMessages_DOTA_UM_AbilityDraftRequestAbility
[ "OnCDOTAUserMsg_AbilityDraftRequestAbility", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_AbilityDraftRequestAbility" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1276-L1278
127,829
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_ItemSold
func (c *Callbacks) OnCDOTAUserMsg_ItemSold(fn func(*dota.CDOTAUserMsg_ItemSold) error) { c.onCDOTAUserMsg_ItemSold = append(c.onCDOTAUserMsg_ItemSold, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_ItemSold(fn func(*dota.CDOTAUserMsg_ItemSold) error) { c.onCDOTAUserMsg_ItemSold = append(c.onCDOTAUserMsg_ItemSold, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_ItemSold", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_ItemSold", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_ItemSold", "=", "append", "(", "c", ".", "onCDOTAUserMsg_ItemSold", ",", ...
// OnCDOTAUserMsg_ItemSold registers a callback for EDotaUserMessages_DOTA_UM_ItemSold
[ "OnCDOTAUserMsg_ItemSold", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_ItemSold" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1281-L1283
127,830
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_DamageReport
func (c *Callbacks) OnCDOTAUserMsg_DamageReport(fn func(*dota.CDOTAUserMsg_DamageReport) error) { c.onCDOTAUserMsg_DamageReport = append(c.onCDOTAUserMsg_DamageReport, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_DamageReport(fn func(*dota.CDOTAUserMsg_DamageReport) error) { c.onCDOTAUserMsg_DamageReport = append(c.onCDOTAUserMsg_DamageReport, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_DamageReport", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_DamageReport", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_DamageReport", "=", "append", "(", "c", ".", "onCDOTAUserMsg_DamageRe...
// OnCDOTAUserMsg_DamageReport registers a callback for EDotaUserMessages_DOTA_UM_DamageReport
[ "OnCDOTAUserMsg_DamageReport", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_DamageReport" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1286-L1288
127,831
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_SalutePlayer
func (c *Callbacks) OnCDOTAUserMsg_SalutePlayer(fn func(*dota.CDOTAUserMsg_SalutePlayer) error) { c.onCDOTAUserMsg_SalutePlayer = append(c.onCDOTAUserMsg_SalutePlayer, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_SalutePlayer(fn func(*dota.CDOTAUserMsg_SalutePlayer) error) { c.onCDOTAUserMsg_SalutePlayer = append(c.onCDOTAUserMsg_SalutePlayer, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_SalutePlayer", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_SalutePlayer", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_SalutePlayer", "=", "append", "(", "c", ".", "onCDOTAUserMsg_SalutePl...
// OnCDOTAUserMsg_SalutePlayer registers a callback for EDotaUserMessages_DOTA_UM_SalutePlayer
[ "OnCDOTAUserMsg_SalutePlayer", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_SalutePlayer" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1291-L1293
127,832
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_TipAlert
func (c *Callbacks) OnCDOTAUserMsg_TipAlert(fn func(*dota.CDOTAUserMsg_TipAlert) error) { c.onCDOTAUserMsg_TipAlert = append(c.onCDOTAUserMsg_TipAlert, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_TipAlert(fn func(*dota.CDOTAUserMsg_TipAlert) error) { c.onCDOTAUserMsg_TipAlert = append(c.onCDOTAUserMsg_TipAlert, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_TipAlert", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_TipAlert", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_TipAlert", "=", "append", "(", "c", ".", "onCDOTAUserMsg_TipAlert", ",", ...
// OnCDOTAUserMsg_TipAlert registers a callback for EDotaUserMessages_DOTA_UM_TipAlert
[ "OnCDOTAUserMsg_TipAlert", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_TipAlert" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1296-L1298
127,833
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_ReplaceQueryUnit
func (c *Callbacks) OnCDOTAUserMsg_ReplaceQueryUnit(fn func(*dota.CDOTAUserMsg_ReplaceQueryUnit) error) { c.onCDOTAUserMsg_ReplaceQueryUnit = append(c.onCDOTAUserMsg_ReplaceQueryUnit, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_ReplaceQueryUnit(fn func(*dota.CDOTAUserMsg_ReplaceQueryUnit) error) { c.onCDOTAUserMsg_ReplaceQueryUnit = append(c.onCDOTAUserMsg_ReplaceQueryUnit, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_ReplaceQueryUnit", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_ReplaceQueryUnit", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_ReplaceQueryUnit", "=", "append", "(", "c", ".", "onCDOTAUser...
// OnCDOTAUserMsg_ReplaceQueryUnit registers a callback for EDotaUserMessages_DOTA_UM_ReplaceQueryUnit
[ "OnCDOTAUserMsg_ReplaceQueryUnit", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_ReplaceQueryUnit" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1301-L1303
127,834
dotabuff/manta
callbacks.go
OnCDOTAUserMsg_EmptyTeleportAlert
func (c *Callbacks) OnCDOTAUserMsg_EmptyTeleportAlert(fn func(*dota.CDOTAUserMsg_EmptyTeleportAlert) error) { c.onCDOTAUserMsg_EmptyTeleportAlert = append(c.onCDOTAUserMsg_EmptyTeleportAlert, fn) }
go
func (c *Callbacks) OnCDOTAUserMsg_EmptyTeleportAlert(fn func(*dota.CDOTAUserMsg_EmptyTeleportAlert) error) { c.onCDOTAUserMsg_EmptyTeleportAlert = append(c.onCDOTAUserMsg_EmptyTeleportAlert, fn) }
[ "func", "(", "c", "*", "Callbacks", ")", "OnCDOTAUserMsg_EmptyTeleportAlert", "(", "fn", "func", "(", "*", "dota", ".", "CDOTAUserMsg_EmptyTeleportAlert", ")", "error", ")", "{", "c", ".", "onCDOTAUserMsg_EmptyTeleportAlert", "=", "append", "(", "c", ".", "onCDO...
// OnCDOTAUserMsg_EmptyTeleportAlert registers a callback for EDotaUserMessages_DOTA_UM_EmptyTeleportAlert
[ "OnCDOTAUserMsg_EmptyTeleportAlert", "registers", "a", "callback", "for", "EDotaUserMessages_DOTA_UM_EmptyTeleportAlert" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/callbacks.go#L1306-L1308
127,835
dotabuff/manta
reader.go
nextByte
func (r *reader) nextByte() byte { r.pos += 1 if r.pos > r.size { _panicf("nextByte: insufficient buffer (%d of %d)", r.pos, r.size) } return r.buf[r.pos-1] }
go
func (r *reader) nextByte() byte { r.pos += 1 if r.pos > r.size { _panicf("nextByte: insufficient buffer (%d of %d)", r.pos, r.size) } return r.buf[r.pos-1] }
[ "func", "(", "r", "*", "reader", ")", "nextByte", "(", ")", "byte", "{", "r", ".", "pos", "+=", "1", "\n", "if", "r", ".", "pos", ">", "r", ".", "size", "{", "_panicf", "(", "\"", "\"", ",", "r", ".", "pos", ",", "r", ".", "size", ")", "\...
// nextByte reads the next byte from the buffer
[ "nextByte", "reads", "the", "next", "byte", "from", "the", "buffer" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/reader.go#L41-L47
127,836
dotabuff/manta
reader.go
readBits
func (r *reader) readBits(n uint32) uint32 { for n > r.bitCount { r.bitVal |= uint64(r.nextByte()) << r.bitCount r.bitCount += 8 } x := (r.bitVal & ((1 << n) - 1)) r.bitVal >>= n r.bitCount -= n return uint32(x) }
go
func (r *reader) readBits(n uint32) uint32 { for n > r.bitCount { r.bitVal |= uint64(r.nextByte()) << r.bitCount r.bitCount += 8 } x := (r.bitVal & ((1 << n) - 1)) r.bitVal >>= n r.bitCount -= n return uint32(x) }
[ "func", "(", "r", "*", "reader", ")", "readBits", "(", "n", "uint32", ")", "uint32", "{", "for", "n", ">", "r", ".", "bitCount", "{", "r", ".", "bitVal", "|=", "uint64", "(", "r", ".", "nextByte", "(", ")", ")", "<<", "r", ".", "bitCount", "\n"...
// readBits returns the uint32 value for the given number of sequential bits
[ "readBits", "returns", "the", "uint32", "value", "for", "the", "given", "number", "of", "sequential", "bits" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/reader.go#L50-L61
127,837
dotabuff/manta
reader.go
readByte
func (r *reader) readByte() byte { // Fast path if we're byte aligned if r.bitCount == 0 { return r.nextByte() } return byte(r.readBits(8)) }
go
func (r *reader) readByte() byte { // Fast path if we're byte aligned if r.bitCount == 0 { return r.nextByte() } return byte(r.readBits(8)) }
[ "func", "(", "r", "*", "reader", ")", "readByte", "(", ")", "byte", "{", "// Fast path if we're byte aligned", "if", "r", ".", "bitCount", "==", "0", "{", "return", "r", ".", "nextByte", "(", ")", "\n", "}", "\n\n", "return", "byte", "(", "r", ".", "...
// readByte reads a single byte
[ "readByte", "reads", "a", "single", "byte" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/reader.go#L64-L71
127,838
dotabuff/manta
reader.go
readBytes
func (r *reader) readBytes(n uint32) []byte { // Fast path if we're byte aligned if r.bitCount == 0 { r.pos += n if r.pos > r.size { _panicf("readBytes: insufficient buffer (%d of %d)", r.pos, r.size) } return r.buf[r.pos-n : r.pos] } buf := make([]byte, n) for i := uint32(0); i < n; i++ { buf[i] = b...
go
func (r *reader) readBytes(n uint32) []byte { // Fast path if we're byte aligned if r.bitCount == 0 { r.pos += n if r.pos > r.size { _panicf("readBytes: insufficient buffer (%d of %d)", r.pos, r.size) } return r.buf[r.pos-n : r.pos] } buf := make([]byte, n) for i := uint32(0); i < n; i++ { buf[i] = b...
[ "func", "(", "r", "*", "reader", ")", "readBytes", "(", "n", "uint32", ")", "[", "]", "byte", "{", "// Fast path if we're byte aligned", "if", "r", ".", "bitCount", "==", "0", "{", "r", ".", "pos", "+=", "n", "\n", "if", "r", ".", "pos", ">", "r", ...
// readBytes reads the given number of bytes
[ "readBytes", "reads", "the", "given", "number", "of", "bytes" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/reader.go#L74-L89
127,839
dotabuff/manta
reader.go
readVarUint32
func (r *reader) readVarUint32() uint32 { var x, s uint32 for { b := uint32(r.readByte()) x |= (b & 0x7F) << s s += 7 if ((b & 0x80) == 0) || (s == 35) { break } } return x }
go
func (r *reader) readVarUint32() uint32 { var x, s uint32 for { b := uint32(r.readByte()) x |= (b & 0x7F) << s s += 7 if ((b & 0x80) == 0) || (s == 35) { break } } return x }
[ "func", "(", "r", "*", "reader", ")", "readVarUint32", "(", ")", "uint32", "{", "var", "x", ",", "s", "uint32", "\n", "for", "{", "b", ":=", "uint32", "(", "r", ".", "readByte", "(", ")", ")", "\n", "x", "|=", "(", "b", "&", "0x7F", ")", "<<"...
// readVarUint64 reads an unsigned 32-bit varint
[ "readVarUint64", "reads", "an", "unsigned", "32", "-", "bit", "varint" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/reader.go#L102-L114
127,840
dotabuff/manta
reader.go
readVarInt32
func (r *reader) readVarInt32() int32 { ux := r.readVarUint32() x := int32(ux >> 1) if ux&1 != 0 { x = ^x } return x }
go
func (r *reader) readVarInt32() int32 { ux := r.readVarUint32() x := int32(ux >> 1) if ux&1 != 0 { x = ^x } return x }
[ "func", "(", "r", "*", "reader", ")", "readVarInt32", "(", ")", "int32", "{", "ux", ":=", "r", ".", "readVarUint32", "(", ")", "\n", "x", ":=", "int32", "(", "ux", ">>", "1", ")", "\n", "if", "ux", "&", "1", "!=", "0", "{", "x", "=", "^", "...
// readVarInt64 reads a signed 32-bit varint
[ "readVarInt64", "reads", "a", "signed", "32", "-", "bit", "varint" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/reader.go#L117-L124
127,841
dotabuff/manta
reader.go
readVarUint64
func (r *reader) readVarUint64() uint64 { var x, s uint64 for i := 0; ; i++ { b := r.readByte() if b < 0x80 { if i > 9 || i == 9 && b > 1 { _panicf("read overflow: varint overflows uint64") } return x | uint64(b)<<s } x |= uint64(b&0x7f) << s s += 7 } }
go
func (r *reader) readVarUint64() uint64 { var x, s uint64 for i := 0; ; i++ { b := r.readByte() if b < 0x80 { if i > 9 || i == 9 && b > 1 { _panicf("read overflow: varint overflows uint64") } return x | uint64(b)<<s } x |= uint64(b&0x7f) << s s += 7 } }
[ "func", "(", "r", "*", "reader", ")", "readVarUint64", "(", ")", "uint64", "{", "var", "x", ",", "s", "uint64", "\n", "for", "i", ":=", "0", ";", ";", "i", "++", "{", "b", ":=", "r", ".", "readByte", "(", ")", "\n", "if", "b", "<", "0x80", ...
// readVarUint64 reads an unsigned 64-bit varint
[ "readVarUint64", "reads", "an", "unsigned", "64", "-", "bit", "varint" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/reader.go#L127-L140
127,842
dotabuff/manta
reader.go
readVarInt64
func (r *reader) readVarInt64() int64 { ux := r.readVarUint64() x := int64(ux >> 1) if ux&1 != 0 { x = ^x } return x }
go
func (r *reader) readVarInt64() int64 { ux := r.readVarUint64() x := int64(ux >> 1) if ux&1 != 0 { x = ^x } return x }
[ "func", "(", "r", "*", "reader", ")", "readVarInt64", "(", ")", "int64", "{", "ux", ":=", "r", ".", "readVarUint64", "(", ")", "\n", "x", ":=", "int64", "(", "ux", ">>", "1", ")", "\n", "if", "ux", "&", "1", "!=", "0", "{", "x", "=", "^", "...
// readVarInt64 reads a signed 64-bit varint
[ "readVarInt64", "reads", "a", "signed", "64", "-", "bit", "varint" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/reader.go#L143-L150
127,843
dotabuff/manta
reader.go
readUBitVar
func (r *reader) readUBitVar() uint32 { ret := r.readBits(6) switch ret & 0x30 { case 16: ret = (ret & 15) | (r.readBits(4) << 4) break case 32: ret = (ret & 15) | (r.readBits(8) << 4) break case 48: ret = (ret & 15) | (r.readBits(28) << 4) break } return ret }
go
func (r *reader) readUBitVar() uint32 { ret := r.readBits(6) switch ret & 0x30 { case 16: ret = (ret & 15) | (r.readBits(4) << 4) break case 32: ret = (ret & 15) | (r.readBits(8) << 4) break case 48: ret = (ret & 15) | (r.readBits(28) << 4) break } return ret }
[ "func", "(", "r", "*", "reader", ")", "readUBitVar", "(", ")", "uint32", "{", "ret", ":=", "r", ".", "readBits", "(", "6", ")", "\n\n", "switch", "ret", "&", "0x30", "{", "case", "16", ":", "ret", "=", "(", "ret", "&", "15", ")", "|", "(", "r...
// readUBitVar reads a variable length uint32 with encoding in last to bits of 6 bit group
[ "readUBitVar", "reads", "a", "variable", "length", "uint32", "with", "encoding", "in", "last", "to", "bits", "of", "6", "bit", "group" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/reader.go#L163-L179
127,844
dotabuff/manta
reader.go
readUBitVarFP
func (r *reader) readUBitVarFP() uint32 { if r.readBoolean() { return r.readBits(2) } if r.readBoolean() { return r.readBits(4) } if r.readBoolean() { return r.readBits(10) } if r.readBoolean() { return r.readBits(17) } return r.readBits(31) }
go
func (r *reader) readUBitVarFP() uint32 { if r.readBoolean() { return r.readBits(2) } if r.readBoolean() { return r.readBits(4) } if r.readBoolean() { return r.readBits(10) } if r.readBoolean() { return r.readBits(17) } return r.readBits(31) }
[ "func", "(", "r", "*", "reader", ")", "readUBitVarFP", "(", ")", "uint32", "{", "if", "r", ".", "readBoolean", "(", ")", "{", "return", "r", ".", "readBits", "(", "2", ")", "\n", "}", "\n", "if", "r", ".", "readBoolean", "(", ")", "{", "return", ...
// readUBitVarFP reads a variable length uint32 encoded using fieldpath encoding
[ "readUBitVarFP", "reads", "a", "variable", "length", "uint32", "encoded", "using", "fieldpath", "encoding" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/reader.go#L182-L196
127,845
dotabuff/manta
reader.go
readStringN
func (r *reader) readStringN(n uint32) string { return string(r.readBytes(n)) }
go
func (r *reader) readStringN(n uint32) string { return string(r.readBytes(n)) }
[ "func", "(", "r", "*", "reader", ")", "readStringN", "(", "n", "uint32", ")", "string", "{", "return", "string", "(", "r", ".", "readBytes", "(", "n", ")", ")", "\n", "}" ]
// readStringN reads a string of a given length
[ "readStringN", "reads", "a", "string", "of", "a", "given", "length" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/reader.go#L203-L205
127,846
dotabuff/manta
reader.go
readString
func (r *reader) readString() string { buf := make([]byte, 0) for { b := r.readByte() if b == 0 { break } buf = append(buf, b) } return string(buf) }
go
func (r *reader) readString() string { buf := make([]byte, 0) for { b := r.readByte() if b == 0 { break } buf = append(buf, b) } return string(buf) }
[ "func", "(", "r", "*", "reader", ")", "readString", "(", ")", "string", "{", "buf", ":=", "make", "(", "[", "]", "byte", ",", "0", ")", "\n", "for", "{", "b", ":=", "r", ".", "readByte", "(", ")", "\n", "if", "b", "==", "0", "{", "break", "...
// readString reads a null terminated string
[ "readString", "reads", "a", "null", "terminated", "string" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/reader.go#L208-L219
127,847
dotabuff/manta
reader.go
readCoord
func (r *reader) readCoord() float32 { value := float32(0.0) intval := r.readBits(1) fractval := r.readBits(1) signbit := false if intval != 0 || fractval != 0 { signbit = r.readBoolean() if intval != 0 { intval = r.readBits(14) + 1 } if fractval != 0 { fractval = r.readBits(5) } value = flo...
go
func (r *reader) readCoord() float32 { value := float32(0.0) intval := r.readBits(1) fractval := r.readBits(1) signbit := false if intval != 0 || fractval != 0 { signbit = r.readBoolean() if intval != 0 { intval = r.readBits(14) + 1 } if fractval != 0 { fractval = r.readBits(5) } value = flo...
[ "func", "(", "r", "*", "reader", ")", "readCoord", "(", ")", "float32", "{", "value", ":=", "float32", "(", "0.0", ")", "\n\n", "intval", ":=", "r", ".", "readBits", "(", "1", ")", "\n", "fractval", ":=", "r", ".", "readBits", "(", "1", ")", "\n"...
// readCoord reads a coord as a float32
[ "readCoord", "reads", "a", "coord", "as", "a", "float32" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/reader.go#L222-L249
127,848
dotabuff/manta
reader.go
readAngle
func (r *reader) readAngle(n uint32) float32 { return float32(r.readBits(n)) * 360.0 / float32(int(1<<n)) }
go
func (r *reader) readAngle(n uint32) float32 { return float32(r.readBits(n)) * 360.0 / float32(int(1<<n)) }
[ "func", "(", "r", "*", "reader", ")", "readAngle", "(", "n", "uint32", ")", "float32", "{", "return", "float32", "(", "r", ".", "readBits", "(", "n", ")", ")", "*", "360.0", "/", "float32", "(", "int", "(", "1", "<<", "n", ")", ")", "\n", "}" ]
// readAngle reads a bit angle of the given size
[ "readAngle", "reads", "a", "bit", "angle", "of", "the", "given", "size" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/reader.go#L252-L254
127,849
dotabuff/manta
reader.go
readNormal
func (r *reader) readNormal() float32 { isNeg := r.readBoolean() len := r.readBits(11) ret := float32(len) * float32(1.0/(float32(1<<11)-1.0)) if isNeg { return -ret } else { return ret } }
go
func (r *reader) readNormal() float32 { isNeg := r.readBoolean() len := r.readBits(11) ret := float32(len) * float32(1.0/(float32(1<<11)-1.0)) if isNeg { return -ret } else { return ret } }
[ "func", "(", "r", "*", "reader", ")", "readNormal", "(", ")", "float32", "{", "isNeg", ":=", "r", ".", "readBoolean", "(", ")", "\n", "len", ":=", "r", ".", "readBits", "(", "11", ")", "\n", "ret", ":=", "float32", "(", "len", ")", "*", "float32"...
// readNormal reads a normalized float vector
[ "readNormal", "reads", "a", "normalized", "float", "vector" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/reader.go#L257-L267
127,850
dotabuff/manta
reader.go
read3BitNormal
func (r *reader) read3BitNormal() []float32 { ret := []float32{0.0, 0.0, 0.0} hasX := r.readBoolean() haxY := r.readBoolean() if hasX { ret[0] = r.readNormal() } if haxY { ret[1] = r.readNormal() } negZ := r.readBoolean() prodsum := ret[0]*ret[0] + ret[1]*ret[1] if prodsum < 1.0 { ret[2] = float32(...
go
func (r *reader) read3BitNormal() []float32 { ret := []float32{0.0, 0.0, 0.0} hasX := r.readBoolean() haxY := r.readBoolean() if hasX { ret[0] = r.readNormal() } if haxY { ret[1] = r.readNormal() } negZ := r.readBoolean() prodsum := ret[0]*ret[0] + ret[1]*ret[1] if prodsum < 1.0 { ret[2] = float32(...
[ "func", "(", "r", "*", "reader", ")", "read3BitNormal", "(", ")", "[", "]", "float32", "{", "ret", ":=", "[", "]", "float32", "{", "0.0", ",", "0.0", ",", "0.0", "}", "\n\n", "hasX", ":=", "r", ".", "readBoolean", "(", ")", "\n", "haxY", ":=", ...
// read3BitNormal reads a normalized float vector
[ "read3BitNormal", "reads", "a", "normalized", "float", "vector" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/reader.go#L270-L298
127,851
dotabuff/manta
reader.go
readBitsAsBytes
func (r *reader) readBitsAsBytes(n uint32) []byte { tmp := make([]byte, 0) for n >= 8 { tmp = append(tmp, r.readByte()) n -= 8 } if n > 0 { tmp = append(tmp, byte(r.readBits(n))) } return tmp }
go
func (r *reader) readBitsAsBytes(n uint32) []byte { tmp := make([]byte, 0) for n >= 8 { tmp = append(tmp, r.readByte()) n -= 8 } if n > 0 { tmp = append(tmp, byte(r.readBits(n))) } return tmp }
[ "func", "(", "r", "*", "reader", ")", "readBitsAsBytes", "(", "n", "uint32", ")", "[", "]", "byte", "{", "tmp", ":=", "make", "(", "[", "]", "byte", ",", "0", ")", "\n", "for", "n", ">=", "8", "{", "tmp", "=", "append", "(", "tmp", ",", "r", ...
// readBitsAsBytes reads the given number of bits in groups of bytes
[ "readBitsAsBytes", "reads", "the", "given", "number", "of", "bits", "in", "groups", "of", "bytes" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/reader.go#L301-L311
127,852
dotabuff/manta
gen/callbacks.go
makeContext
func makeContext() ctx { c := ctx{ DemoTypes: []ctxType{}, PacketTypes: []ctxType{}, } demoIds := []int{} demoMap := map[int]ctxType{} packetIds := []int{} packetMap := map[int]ctxType{} for _, t := range messageTypes { for vs, n := range t.enumValues { // Find an enum type for the enum value if ...
go
func makeContext() ctx { c := ctx{ DemoTypes: []ctxType{}, PacketTypes: []ctxType{}, } demoIds := []int{} demoMap := map[int]ctxType{} packetIds := []int{} packetMap := map[int]ctxType{} for _, t := range messageTypes { for vs, n := range t.enumValues { // Find an enum type for the enum value if ...
[ "func", "makeContext", "(", ")", "ctx", "{", "c", ":=", "ctx", "{", "DemoTypes", ":", "[", "]", "ctxType", "{", "}", ",", "PacketTypes", ":", "[", "]", "ctxType", "{", "}", ",", "}", "\n\n", "demoIds", ":=", "[", "]", "int", "{", "}", "\n", "de...
// makeContext transforms messageTypes information into template context
[ "makeContext", "transforms", "messageTypes", "information", "into", "template", "context" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/gen/callbacks.go#L250-L308
127,853
dotabuff/manta
gen/callbacks.go
discoverTypes
func discoverTypes(protoPath string) { fileset := token.NewFileSet() packageMap, err := parser.ParseDir(fileset, protoPath, nil, 0) if err != nil { panic(err) } // Iterate over packages for _, p := range packageMap { // Iterate over files for _, f := range p.Files { // Iterate over declarations for _...
go
func discoverTypes(protoPath string) { fileset := token.NewFileSet() packageMap, err := parser.ParseDir(fileset, protoPath, nil, 0) if err != nil { panic(err) } // Iterate over packages for _, p := range packageMap { // Iterate over files for _, f := range p.Files { // Iterate over declarations for _...
[ "func", "discoverTypes", "(", "protoPath", "string", ")", "{", "fileset", ":=", "token", ".", "NewFileSet", "(", ")", "\n", "packageMap", ",", "err", ":=", "parser", ".", "ParseDir", "(", "fileset", ",", "protoPath", ",", "nil", ",", "0", ")", "\n", "i...
// discoverTypes walks the go files in the dota directory and populates the data // in messageTypes and messageTypeNames.
[ "discoverTypes", "walks", "the", "go", "files", "in", "the", "dota", "directory", "and", "populates", "the", "data", "in", "messageTypes", "and", "messageTypeNames", "." ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/gen/callbacks.go#L312-L356
127,854
dotabuff/manta
gen/callbacks.go
nameOfValue
func nameOfValue(t *ast.ValueSpec) string { if len(t.Names) != 1 { fmt.Println("unexpected names", t.Names) panic("unexpected names") } return t.Names[0].Name }
go
func nameOfValue(t *ast.ValueSpec) string { if len(t.Names) != 1 { fmt.Println("unexpected names", t.Names) panic("unexpected names") } return t.Names[0].Name }
[ "func", "nameOfValue", "(", "t", "*", "ast", ".", "ValueSpec", ")", "string", "{", "if", "len", "(", "t", ".", "Names", ")", "!=", "1", "{", "fmt", ".", "Println", "(", "\"", "\"", ",", "t", ".", "Names", ")", "\n", "panic", "(", "\"", "\"", ...
// nameOfValue extracts the name of an enum value, ex. EDemoCommands_DEM_Packet
[ "nameOfValue", "extracts", "the", "name", "of", "an", "enum", "value", "ex", ".", "EDemoCommands_DEM_Packet" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/gen/callbacks.go#L359-L365
127,855
dotabuff/manta
gen/callbacks.go
typeOfValue
func typeOfValue(t *ast.ValueSpec) string { switch t := t.Type.(type) { case *ast.Ident: return t.String() } return "" }
go
func typeOfValue(t *ast.ValueSpec) string { switch t := t.Type.(type) { case *ast.Ident: return t.String() } return "" }
[ "func", "typeOfValue", "(", "t", "*", "ast", ".", "ValueSpec", ")", "string", "{", "switch", "t", ":=", "t", ".", "Type", ".", "(", "type", ")", "{", "case", "*", "ast", ".", "Ident", ":", "return", "t", ".", "String", "(", ")", "\n", "}", "\n"...
// typeOfValue extracts the type of an enum value, ex. EDemoCommands
[ "typeOfValue", "extracts", "the", "type", "of", "an", "enum", "value", "ex", ".", "EDemoCommands" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/gen/callbacks.go#L368-L374
127,856
dotabuff/manta
gen/callbacks.go
valueOfValue
func valueOfValue(t *ast.ValueSpec) int { if len(t.Values) != 1 { fmt.Println("unexpected values", t.Values) panic("unexpected values") } switch t := t.Values[0].(type) { case *ast.BasicLit: n, _ := strconv.Atoi(t.Value) return n case *ast.UnaryExpr: x := t.X.(*ast.BasicLit) n, _ := strconv.Atoi(x.Va...
go
func valueOfValue(t *ast.ValueSpec) int { if len(t.Values) != 1 { fmt.Println("unexpected values", t.Values) panic("unexpected values") } switch t := t.Values[0].(type) { case *ast.BasicLit: n, _ := strconv.Atoi(t.Value) return n case *ast.UnaryExpr: x := t.X.(*ast.BasicLit) n, _ := strconv.Atoi(x.Va...
[ "func", "valueOfValue", "(", "t", "*", "ast", ".", "ValueSpec", ")", "int", "{", "if", "len", "(", "t", ".", "Values", ")", "!=", "1", "{", "fmt", ".", "Println", "(", "\"", "\"", ",", "t", ".", "Values", ")", "\n", "panic", "(", "\"", "\"", ...
// valueOfValue extracts the value of an enum value, ex. 7
[ "valueOfValue", "extracts", "the", "value", "of", "an", "enum", "value", "ex", ".", "7" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/gen/callbacks.go#L377-L400
127,857
dotabuff/manta
game_event.go
GetString
func (e *GameEvent) GetString(name string) (string, error) { // Get the key from the message k, err := e.getEventKey(name) if err != nil { return "", err } // Make sure it's a string. if k.GetType() != gameEventTypeString { return "", _errorf("field %s: expected string, got %s", name, gameEventTypeNames[k.Ge...
go
func (e *GameEvent) GetString(name string) (string, error) { // Get the key from the message k, err := e.getEventKey(name) if err != nil { return "", err } // Make sure it's a string. if k.GetType() != gameEventTypeString { return "", _errorf("field %s: expected string, got %s", name, gameEventTypeNames[k.Ge...
[ "func", "(", "e", "*", "GameEvent", ")", "GetString", "(", "name", "string", ")", "(", "string", ",", "error", ")", "{", "// Get the key from the message", "k", ",", "err", ":=", "e", ".", "getEventKey", "(", "name", ")", "\n", "if", "err", "!=", "nil"...
// Gets the string value of a named field.
[ "Gets", "the", "string", "value", "of", "a", "named", "field", "." ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/game_event.go#L75-L88
127,858
dotabuff/manta
game_event.go
GetFloat32
func (e *GameEvent) GetFloat32(name string) (float32, error) { // Get the key from the message k, err := e.getEventKey(name) if err != nil { return 0.0, err } // Make sure it's a bool. if k.GetType() != gameEventTypeFloat { return 0.0, _errorf("field %s: expected float, got %s", name, gameEventTypeNames[k.Ge...
go
func (e *GameEvent) GetFloat32(name string) (float32, error) { // Get the key from the message k, err := e.getEventKey(name) if err != nil { return 0.0, err } // Make sure it's a bool. if k.GetType() != gameEventTypeFloat { return 0.0, _errorf("field %s: expected float, got %s", name, gameEventTypeNames[k.Ge...
[ "func", "(", "e", "*", "GameEvent", ")", "GetFloat32", "(", "name", "string", ")", "(", "float32", ",", "error", ")", "{", "// Get the key from the message", "k", ",", "err", ":=", "e", ".", "getEventKey", "(", "name", ")", "\n", "if", "err", "!=", "ni...
// Gets the float value of a named field.
[ "Gets", "the", "float", "value", "of", "a", "named", "field", "." ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/game_event.go#L91-L104
127,859
dotabuff/manta
game_event.go
GetInt32
func (e *GameEvent) GetInt32(name string) (int32, error) { // Get the key from the message k, err := e.getEventKey(name) if err != nil { return 0, err } // Return based on the type. switch k.GetType() { case gameEventTypeLong: return k.GetValLong(), nil case gameEventTypeShort: return k.GetValShort(), ni...
go
func (e *GameEvent) GetInt32(name string) (int32, error) { // Get the key from the message k, err := e.getEventKey(name) if err != nil { return 0, err } // Return based on the type. switch k.GetType() { case gameEventTypeLong: return k.GetValLong(), nil case gameEventTypeShort: return k.GetValShort(), ni...
[ "func", "(", "e", "*", "GameEvent", ")", "GetInt32", "(", "name", "string", ")", "(", "int32", ",", "error", ")", "{", "// Get the key from the message", "k", ",", "err", ":=", "e", ".", "getEventKey", "(", "name", ")", "\n", "if", "err", "!=", "nil", ...
// Gets the integer value of a named field.
[ "Gets", "the", "integer", "value", "of", "a", "named", "field", "." ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/game_event.go#L107-L125
127,860
dotabuff/manta
game_event.go
GetBool
func (e *GameEvent) GetBool(name string) (bool, error) { // Get the key from the message k, err := e.getEventKey(name) if err != nil { return false, err } // Make sure it's a bool. if k.GetType() != gameEventTypeBool { return false, _errorf("field %s: expected bool, got %s", name, gameEventTypeNames[k.GetTyp...
go
func (e *GameEvent) GetBool(name string) (bool, error) { // Get the key from the message k, err := e.getEventKey(name) if err != nil { return false, err } // Make sure it's a bool. if k.GetType() != gameEventTypeBool { return false, _errorf("field %s: expected bool, got %s", name, gameEventTypeNames[k.GetTyp...
[ "func", "(", "e", "*", "GameEvent", ")", "GetBool", "(", "name", "string", ")", "(", "bool", ",", "error", ")", "{", "// Get the key from the message", "k", ",", "err", ":=", "e", ".", "getEventKey", "(", "name", ")", "\n", "if", "err", "!=", "nil", ...
// Gets the bool value of a named field.
[ "Gets", "the", "bool", "value", "of", "a", "named", "field", "." ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/game_event.go#L128-L141
127,861
dotabuff/manta
game_event.go
GetUint64
func (e *GameEvent) GetUint64(name string) (uint64, error) { // Get the key from the message k, err := e.getEventKey(name) if err != nil { return 0, err } // Make sure it's a uint64. if k.GetType() != gameEventTypeUint64 { return 0, _errorf("field %s: expected uint64, got %s", name, gameEventTypeNames[k.GetT...
go
func (e *GameEvent) GetUint64(name string) (uint64, error) { // Get the key from the message k, err := e.getEventKey(name) if err != nil { return 0, err } // Make sure it's a uint64. if k.GetType() != gameEventTypeUint64 { return 0, _errorf("field %s: expected uint64, got %s", name, gameEventTypeNames[k.GetT...
[ "func", "(", "e", "*", "GameEvent", ")", "GetUint64", "(", "name", "string", ")", "(", "uint64", ",", "error", ")", "{", "// Get the key from the message", "k", ",", "err", ":=", "e", ".", "getEventKey", "(", "name", ")", "\n", "if", "err", "!=", "nil"...
// Gets the uint64 value of a named field.
[ "Gets", "the", "uint64", "value", "of", "a", "named", "field", "." ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/game_event.go#L144-L157
127,862
dotabuff/manta
game_event.go
getEventKey
func (e *GameEvent) getEventKey(name string) (*dota.CMsgSource1LegacyGameEventKeyT, error) { f, ok := e.t.fields[name] if !ok { return nil, _errorf("field %s: missing", name) } if f.i > len(e.m.GetKeys()) { return nil, _errorf("field %s: %d out of range", name, f.i) } return e.m.GetKeys()[f.i], nil }
go
func (e *GameEvent) getEventKey(name string) (*dota.CMsgSource1LegacyGameEventKeyT, error) { f, ok := e.t.fields[name] if !ok { return nil, _errorf("field %s: missing", name) } if f.i > len(e.m.GetKeys()) { return nil, _errorf("field %s: %d out of range", name, f.i) } return e.m.GetKeys()[f.i], nil }
[ "func", "(", "e", "*", "GameEvent", ")", "getEventKey", "(", "name", "string", ")", "(", "*", "dota", ".", "CMsgSource1LegacyGameEventKeyT", ",", "error", ")", "{", "f", ",", "ok", ":=", "e", ".", "t", ".", "fields", "[", "name", "]", "\n", "if", "...
// Finds the key in the game event which corresponds to a given name.
[ "Finds", "the", "key", "in", "the", "game", "event", "which", "corresponds", "to", "a", "given", "name", "." ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/game_event.go#L160-L171
127,863
dotabuff/manta
game_event.go
onCMsgSource1LegacyGameEvent
func (p *Parser) onCMsgSource1LegacyGameEvent(m *dota.CMsgSource1LegacyGameEvent) error { // Look up the handler name by event id. name, ok := p.gameEventNames[m.GetEventid()] if !ok { return _errorf("unknown event id: %d", m.GetEventid()) } // Get the handlers for the event name. Return early if none. handler...
go
func (p *Parser) onCMsgSource1LegacyGameEvent(m *dota.CMsgSource1LegacyGameEvent) error { // Look up the handler name by event id. name, ok := p.gameEventNames[m.GetEventid()] if !ok { return _errorf("unknown event id: %d", m.GetEventid()) } // Get the handlers for the event name. Return early if none. handler...
[ "func", "(", "p", "*", "Parser", ")", "onCMsgSource1LegacyGameEvent", "(", "m", "*", "dota", ".", "CMsgSource1LegacyGameEvent", ")", "error", "{", "// Look up the handler name by event id.", "name", ",", "ok", ":=", "p", ".", "gameEventNames", "[", "m", ".", "Ge...
// Internal handler for callback OnCMsgSource1LegacyGameEvent. // Looks up the name and type of an event and offers it to registered handlers.
[ "Internal", "handler", "for", "callback", "OnCMsgSource1LegacyGameEvent", ".", "Looks", "up", "the", "name", "and", "type", "of", "an", "event", "and", "offers", "it", "to", "registered", "handlers", "." ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/game_event.go#L217-L245
127,864
dotabuff/manta
game_event.go
OnGameEvent
func (p *Parser) OnGameEvent(name string, fn GameEventHandler) { p.gameEventHandlers[name] = append(p.gameEventHandlers[name], fn) }
go
func (p *Parser) OnGameEvent(name string, fn GameEventHandler) { p.gameEventHandlers[name] = append(p.gameEventHandlers[name], fn) }
[ "func", "(", "p", "*", "Parser", ")", "OnGameEvent", "(", "name", "string", ",", "fn", "GameEventHandler", ")", "{", "p", ".", "gameEventHandlers", "[", "name", "]", "=", "append", "(", "p", ".", "gameEventHandlers", "[", "name", "]", ",", "fn", ")", ...
// OnGameEvent registers an GameEventHandler that will be called when a // named GameEvent occurs.
[ "OnGameEvent", "registers", "an", "GameEventHandler", "that", "will", "be", "called", "when", "a", "named", "GameEvent", "occurs", "." ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/game_event.go#L249-L251
127,865
dotabuff/manta
string_table.go
GetTableByName
func (ts *stringTables) GetTableByName(name string) (*stringTable, bool) { i, ok := ts.NameIndex[name] if !ok { return nil, false } t, ok := ts.Tables[i] return t, ok }
go
func (ts *stringTables) GetTableByName(name string) (*stringTable, bool) { i, ok := ts.NameIndex[name] if !ok { return nil, false } t, ok := ts.Tables[i] return t, ok }
[ "func", "(", "ts", "*", "stringTables", ")", "GetTableByName", "(", "name", "string", ")", "(", "*", "stringTable", ",", "bool", ")", "{", "i", ",", "ok", ":=", "ts", ".", "NameIndex", "[", "name", "]", "\n", "if", "!", "ok", "{", "return", "nil", ...
// Retrieves a string table by its name. Check the bool.
[ "Retrieves", "a", "string", "table", "by", "its", "name", ".", "Check", "the", "bool", "." ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/string_table.go#L21-L28
127,866
dotabuff/manta
string_table.go
newStringTables
func newStringTables() *stringTables { return &stringTables{ Tables: make(map[int32]*stringTable), NameIndex: make(map[string]int32), nextIndex: 0, } }
go
func newStringTables() *stringTables { return &stringTables{ Tables: make(map[int32]*stringTable), NameIndex: make(map[string]int32), nextIndex: 0, } }
[ "func", "newStringTables", "(", ")", "*", "stringTables", "{", "return", "&", "stringTables", "{", "Tables", ":", "make", "(", "map", "[", "int32", "]", "*", "stringTable", ")", ",", "NameIndex", ":", "make", "(", "map", "[", "string", "]", "int32", ")...
// Creates a new empty StringTables.
[ "Creates", "a", "new", "empty", "StringTables", "." ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/string_table.go#L31-L37
127,867
dotabuff/manta
string_table.go
onCSVCMsg_UpdateStringTable
func (p *Parser) onCSVCMsg_UpdateStringTable(m *dota.CSVCMsg_UpdateStringTable) error { // TODO: integrate t, ok := p.stringTables.Tables[m.GetTableId()] if !ok { _panicf("missing string table %d", m.GetTableId()) } if v(5) { _debugf("tick=%d name=%s changedEntries=%d size=%d", p.Tick, t.name, m.GetNumChanged...
go
func (p *Parser) onCSVCMsg_UpdateStringTable(m *dota.CSVCMsg_UpdateStringTable) error { // TODO: integrate t, ok := p.stringTables.Tables[m.GetTableId()] if !ok { _panicf("missing string table %d", m.GetTableId()) } if v(5) { _debugf("tick=%d name=%s changedEntries=%d size=%d", p.Tick, t.name, m.GetNumChanged...
[ "func", "(", "p", "*", "Parser", ")", "onCSVCMsg_UpdateStringTable", "(", "m", "*", "dota", ".", "CSVCMsg_UpdateStringTable", ")", "error", "{", "// TODO: integrate", "t", ",", "ok", ":=", "p", ".", "stringTables", ".", "Tables", "[", "m", ".", "GetTableId",...
// Internal callback for CSVCMsg_UpdateStringTable.
[ "Internal", "callback", "for", "CSVCMsg_UpdateStringTable", "." ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/string_table.go#L126-L161
127,868
dotabuff/manta
string_table.go
parseStringTable
func parseStringTable(buf []byte, numUpdates int32, name string, userDataFixed bool, userDataSize int32, flags int32) (items []*stringTableItem) { defer func() { if err := recover(); err != nil { _debugf("warning: unable to parse string table %s: %s", name, err) return } }() items = make([]*stringTableIte...
go
func parseStringTable(buf []byte, numUpdates int32, name string, userDataFixed bool, userDataSize int32, flags int32) (items []*stringTableItem) { defer func() { if err := recover(); err != nil { _debugf("warning: unable to parse string table %s: %s", name, err) return } }() items = make([]*stringTableIte...
[ "func", "parseStringTable", "(", "buf", "[", "]", "byte", ",", "numUpdates", "int32", ",", "name", "string", ",", "userDataFixed", "bool", ",", "userDataSize", "int32", ",", "flags", "int32", ")", "(", "items", "[", "]", "*", "stringTableItem", ")", "{", ...
// Parse a string table data blob, returning a list of item updates.
[ "Parse", "a", "string", "table", "data", "blob", "returning", "a", "list", "of", "item", "updates", "." ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/string_table.go#L164-L267
127,869
dotabuff/manta
lzss.go
unlzss
func unlzss(buf []byte) ([]byte, error) { r := newReader(buf) if s := r.readStringN(4); s != "LZSS" { return nil, _errorf("expected LZSS header, got %s", s) } size := int(r.readLeUint32()) out := make([]byte, 0) var cmdByte, getCmdByte byte for { if getCmdByte == 0 { cmdByte = r.readByte() } getC...
go
func unlzss(buf []byte) ([]byte, error) { r := newReader(buf) if s := r.readStringN(4); s != "LZSS" { return nil, _errorf("expected LZSS header, got %s", s) } size := int(r.readLeUint32()) out := make([]byte, 0) var cmdByte, getCmdByte byte for { if getCmdByte == 0 { cmdByte = r.readByte() } getC...
[ "func", "unlzss", "(", "buf", "[", "]", "byte", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "r", ":=", "newReader", "(", "buf", ")", "\n\n", "if", "s", ":=", "r", ".", "readStringN", "(", "4", ")", ";", "s", "!=", "\"", "\"", "{", "...
// Decompress a Valve LZSS compressed buffer
[ "Decompress", "a", "Valve", "LZSS", "compressed", "buffer" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/lzss.go#L4-L47
127,870
dotabuff/manta
demo_packet.go
priority
func (m *pendingMessage) priority() int { switch m.t { case // These messages provide context needed for the rest of the tick // and should have the highest priority. int32(dota.NET_Messages_net_Tick), int32(dota.SVC_Messages_svc_CreateStringTable), int32(dota.SVC_Messages_svc_UpdateStringTable), int32(do...
go
func (m *pendingMessage) priority() int { switch m.t { case // These messages provide context needed for the rest of the tick // and should have the highest priority. int32(dota.NET_Messages_net_Tick), int32(dota.SVC_Messages_svc_CreateStringTable), int32(dota.SVC_Messages_svc_UpdateStringTable), int32(do...
[ "func", "(", "m", "*", "pendingMessage", ")", "priority", "(", ")", "int", "{", "switch", "m", ".", "t", "{", "case", "// These messages provide context needed for the rest of the tick", "// and should have the highest priority.", "int32", "(", "dota", ".", "NET_Message...
// Calculates the priority of the message. Lower is more important.
[ "Calculates", "the", "priority", "of", "the", "message", ".", "Lower", "is", "more", "important", "." ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/demo_packet.go#L17-L42
127,871
dotabuff/manta
demo_packet.go
onCDemoPacket
func (p *Parser) onCDemoPacket(m *dota.CDemoPacket) error { // Create a slice to store pending mesages. Messages are read first as // pending messages then sorted before dispatch. ms := make(pendingMessages, 0, 2) // Read all messages from the buffer. Messages are packed serially as // {type, size, data}. We keep...
go
func (p *Parser) onCDemoPacket(m *dota.CDemoPacket) error { // Create a slice to store pending mesages. Messages are read first as // pending messages then sorted before dispatch. ms := make(pendingMessages, 0, 2) // Read all messages from the buffer. Messages are packed serially as // {type, size, data}. We keep...
[ "func", "(", "p", "*", "Parser", ")", "onCDemoPacket", "(", "m", "*", "dota", ".", "CDemoPacket", ")", "error", "{", "// Create a slice to store pending mesages. Messages are read first as", "// pending messages then sorted before dispatch.", "ms", ":=", "make", "(", "pen...
// Internal parser for callback OnCDemoPacket, responsible for extracting // multiple inner packets from a single CDemoPacket. This is the main structure // that contains all other data types in the demo file.
[ "Internal", "parser", "for", "callback", "OnCDemoPacket", "responsible", "for", "extracting", "multiple", "inner", "packets", "from", "a", "single", "CDemoPacket", ".", "This", "is", "the", "main", "structure", "that", "contains", "all", "other", "data", "types", ...
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/demo_packet.go#L62-L89
127,872
dotabuff/manta
demo_packet.go
onCDemoFullPacket
func (p *Parser) onCDemoFullPacket(m *dota.CDemoFullPacket) error { // Per Valve docs, parse the CDemoStringTables first. if m.StringTable != nil { if err := p.onCDemoStringTables(m.GetStringTable()); err != nil { return err } } // Then the CDemoPacket. if m.Packet != nil { if err := p.onCDemoPacket(m.Ge...
go
func (p *Parser) onCDemoFullPacket(m *dota.CDemoFullPacket) error { // Per Valve docs, parse the CDemoStringTables first. if m.StringTable != nil { if err := p.onCDemoStringTables(m.GetStringTable()); err != nil { return err } } // Then the CDemoPacket. if m.Packet != nil { if err := p.onCDemoPacket(m.Ge...
[ "func", "(", "p", "*", "Parser", ")", "onCDemoFullPacket", "(", "m", "*", "dota", ".", "CDemoFullPacket", ")", "error", "{", "// Per Valve docs, parse the CDemoStringTables first.", "if", "m", ".", "StringTable", "!=", "nil", "{", "if", "err", ":=", "p", ".", ...
// Internal parser for callback OnCDemoFullPacket.
[ "Internal", "parser", "for", "callback", "OnCDemoFullPacket", "." ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/demo_packet.go#L92-L108
127,873
dotabuff/manta
util.go
atoi32
func atoi32(s string) (int32, error) { n, err := strconv.ParseInt(s, 0, 32) if err != nil { return 0, err } return int32(n), nil }
go
func atoi32(s string) (int32, error) { n, err := strconv.ParseInt(s, 0, 32) if err != nil { return 0, err } return int32(n), nil }
[ "func", "atoi32", "(", "s", "string", ")", "(", "int32", ",", "error", ")", "{", "n", ",", "err", ":=", "strconv", ".", "ParseInt", "(", "s", ",", "0", ",", "32", ")", "\n", "if", "err", "!=", "nil", "{", "return", "0", ",", "err", "\n", "}",...
// Convert a string to an int32
[ "Convert", "a", "string", "to", "an", "int32" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/util.go#L37-L43
127,874
dotabuff/manta
util.go
_debugf
func _debugf(format string, args ...interface{}) { if v(1) { args = append([]interface{}{_caller(2)}, args...) fmt.Printf("%s: "+format+"\n", args...) } }
go
func _debugf(format string, args ...interface{}) { if v(1) { args = append([]interface{}{_caller(2)}, args...) fmt.Printf("%s: "+format+"\n", args...) } }
[ "func", "_debugf", "(", "format", "string", ",", "args", "...", "interface", "{", "}", ")", "{", "if", "v", "(", "1", ")", "{", "args", "=", "append", "(", "[", "]", "interface", "{", "}", "{", "_caller", "(", "2", ")", "}", ",", "args", "...",...
// printf only if debugging
[ "printf", "only", "if", "debugging" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/util.go#L51-L56
127,875
dotabuff/manta
util.go
_dump
func _dump(label string, args ...interface{}) { fmt.Printf("%s: %s", _caller(2), label) spew.Dump(args...) }
go
func _dump(label string, args ...interface{}) { fmt.Printf("%s: %s", _caller(2), label) spew.Dump(args...) }
[ "func", "_dump", "(", "label", "string", ",", "args", "...", "interface", "{", "}", ")", "{", "fmt", ".", "Printf", "(", "\"", "\"", ",", "_caller", "(", "2", ")", ",", "label", ")", "\n", "spew", ".", "Dump", "(", "args", "...", ")", "\n", "}"...
// dump named object
[ "dump", "named", "object" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/util.go#L74-L77
127,876
dotabuff/manta
util.go
_dump_fixture
func _dump_fixture(filename string, buf []byte) { fmt.Printf("writing fixture %s...\n", filename) if err := ioutil.WriteFile("./fixtures/"+filename, buf, 0644); err != nil { panic(err) } }
go
func _dump_fixture(filename string, buf []byte) { fmt.Printf("writing fixture %s...\n", filename) if err := ioutil.WriteFile("./fixtures/"+filename, buf, 0644); err != nil { panic(err) } }
[ "func", "_dump_fixture", "(", "filename", "string", ",", "buf", "[", "]", "byte", ")", "{", "fmt", ".", "Printf", "(", "\"", "\\n", "\"", ",", "filename", ")", "\n", "if", "err", ":=", "ioutil", ".", "WriteFile", "(", "\"", "\"", "+", "filename", "...
// dumps a given byte buffer to the given fixture filename
[ "dumps", "a", "given", "byte", "buffer", "to", "the", "given", "fixture", "filename" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/util.go#L80-L85
127,877
dotabuff/manta
util.go
_read_fixture
func _read_fixture(filename string) []byte { buf, err := ioutil.ReadFile("./fixtures/" + filename) if err != nil { panic(err) } return buf }
go
func _read_fixture(filename string) []byte { buf, err := ioutil.ReadFile("./fixtures/" + filename) if err != nil { panic(err) } return buf }
[ "func", "_read_fixture", "(", "filename", "string", ")", "[", "]", "byte", "{", "buf", ",", "err", ":=", "ioutil", ".", "ReadFile", "(", "\"", "\"", "+", "filename", ")", "\n", "if", "err", "!=", "nil", "{", "panic", "(", "err", ")", "\n", "}", "...
// reads a byte buffer from the given fixture filename
[ "reads", "a", "byte", "buffer", "from", "the", "given", "fixture", "filename" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/util.go#L88-L94
127,878
dotabuff/manta
util.go
_proto_marshal
func _proto_marshal(obj proto.Message) []byte { buf, err := proto.Marshal(obj) if err != nil { panic(err) } return buf }
go
func _proto_marshal(obj proto.Message) []byte { buf, err := proto.Marshal(obj) if err != nil { panic(err) } return buf }
[ "func", "_proto_marshal", "(", "obj", "proto", ".", "Message", ")", "[", "]", "byte", "{", "buf", ",", "err", ":=", "proto", ".", "Marshal", "(", "obj", ")", "\n", "if", "err", "!=", "nil", "{", "panic", "(", "err", ")", "\n", "}", "\n", "return"...
// marshal a proto.Message to bytes
[ "marshal", "a", "proto", ".", "Message", "to", "bytes" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/util.go#L97-L103
127,879
dotabuff/manta
util.go
_caller
func _caller(n int) string { if pc, _, _, ok := runtime.Caller(n); ok { fns := strings.Split(runtime.FuncForPC(pc).Name(), "/") return fns[len(fns)-1] } return "unknown" }
go
func _caller(n int) string { if pc, _, _, ok := runtime.Caller(n); ok { fns := strings.Split(runtime.FuncForPC(pc).Name(), "/") return fns[len(fns)-1] } return "unknown" }
[ "func", "_caller", "(", "n", "int", ")", "string", "{", "if", "pc", ",", "_", ",", "_", ",", "ok", ":=", "runtime", ".", "Caller", "(", "n", ")", ";", "ok", "{", "fns", ":=", "strings", ".", "Split", "(", "runtime", ".", "FuncForPC", "(", "pc",...
// Returns the name of the calling function
[ "Returns", "the", "name", "of", "the", "calling", "function" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/util.go#L115-L122
127,880
dotabuff/manta
sendtable.go
onCDemoSendTables
func (p *Parser) onCDemoSendTables(m *dota.CDemoSendTables) error { r := newReader(m.GetData()) buf := r.readBytes(r.readVarUint32()) msg := &dota.CSVCMsg_FlattenedSerializer{} if err := proto.Unmarshal(buf, msg); err != nil { return err } patches := []fieldPatch{} for _, h := range fieldPatches { if h.sho...
go
func (p *Parser) onCDemoSendTables(m *dota.CDemoSendTables) error { r := newReader(m.GetData()) buf := r.readBytes(r.readVarUint32()) msg := &dota.CSVCMsg_FlattenedSerializer{} if err := proto.Unmarshal(buf, msg); err != nil { return err } patches := []fieldPatch{} for _, h := range fieldPatches { if h.sho...
[ "func", "(", "p", "*", "Parser", ")", "onCDemoSendTables", "(", "m", "*", "dota", ".", "CDemoSendTables", ")", "error", "{", "r", ":=", "newReader", "(", "m", ".", "GetData", "(", ")", ")", "\n", "buf", ":=", "r", ".", "readBytes", "(", "r", ".", ...
// Internal callback for OnCDemoSendTables.
[ "Internal", "callback", "for", "OnCDemoSendTables", "." ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/sendtable.go#L25-L109
127,881
dotabuff/manta
stream.go
newStream
func newStream(r io.Reader) *stream { return &stream{r, make([]byte, buffer), buffer} }
go
func newStream(r io.Reader) *stream { return &stream{r, make([]byte, buffer), buffer} }
[ "func", "newStream", "(", "r", "io", ".", "Reader", ")", "*", "stream", "{", "return", "&", "stream", "{", "r", ",", "make", "(", "[", "]", "byte", ",", "buffer", ")", ",", "buffer", "}", "\n", "}" ]
// newStream creates a new stream from a given io.Reader
[ "newStream", "creates", "a", "new", "stream", "from", "a", "given", "io", ".", "Reader" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/stream.go#L20-L22
127,882
dotabuff/manta
stream.go
readBytes
func (s *stream) readBytes(n uint32) ([]byte, error) { if n > s.size { s.buf = make([]byte, n) s.size = n } if _, err := io.ReadFull(s.Reader, s.buf[:n]); err != nil { return nil, err } return s.buf[:n], nil }
go
func (s *stream) readBytes(n uint32) ([]byte, error) { if n > s.size { s.buf = make([]byte, n) s.size = n } if _, err := io.ReadFull(s.Reader, s.buf[:n]); err != nil { return nil, err } return s.buf[:n], nil }
[ "func", "(", "s", "*", "stream", ")", "readBytes", "(", "n", "uint32", ")", "(", "[", "]", "byte", ",", "error", ")", "{", "if", "n", ">", "s", ".", "size", "{", "s", ".", "buf", "=", "make", "(", "[", "]", "byte", ",", "n", ")", "\n", "s...
// readBytes reads the given number of bytes from the reader
[ "readBytes", "reads", "the", "given", "number", "of", "bytes", "from", "the", "reader" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/stream.go#L25-L36
127,883
dotabuff/manta
stream.go
readByte
func (s *stream) readByte() (byte, error) { buf, err := s.readBytes(1) if err != nil { return 0, err } return buf[0], nil }
go
func (s *stream) readByte() (byte, error) { buf, err := s.readBytes(1) if err != nil { return 0, err } return buf[0], nil }
[ "func", "(", "s", "*", "stream", ")", "readByte", "(", ")", "(", "byte", ",", "error", ")", "{", "buf", ",", "err", ":=", "s", ".", "readBytes", "(", "1", ")", "\n", "if", "err", "!=", "nil", "{", "return", "0", ",", "err", "\n", "}", "\n", ...
// readByte reads a single byte from the reader
[ "readByte", "reads", "a", "single", "byte", "from", "the", "reader" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/stream.go#L39-L45
127,884
dotabuff/manta
stream.go
readCommand
func (s *stream) readCommand() (dota.EDemoCommands, error) { c, err := s.readVarUint32() return dota.EDemoCommands(c), err }
go
func (s *stream) readCommand() (dota.EDemoCommands, error) { c, err := s.readVarUint32() return dota.EDemoCommands(c), err }
[ "func", "(", "s", "*", "stream", ")", "readCommand", "(", ")", "(", "dota", ".", "EDemoCommands", ",", "error", ")", "{", "c", ",", "err", ":=", "s", ".", "readVarUint32", "(", ")", "\n", "return", "dota", ".", "EDemoCommands", "(", "c", ")", ",", ...
// readCommand reads a varuint32 as an EDemoCommands
[ "readCommand", "reads", "a", "varuint32", "as", "an", "EDemoCommands" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/stream.go#L48-L51
127,885
dotabuff/manta
stream.go
readVarUint32
func (s *stream) readVarUint32() (uint32, error) { var x, y uint32 for { b, err := s.readByte() if err != nil { return 0, err } u := uint32(b) x |= (u & 0x7F) << y y += 7 if ((u & 0x80) == 0) || (y == 35) { break } } return x, nil }
go
func (s *stream) readVarUint32() (uint32, error) { var x, y uint32 for { b, err := s.readByte() if err != nil { return 0, err } u := uint32(b) x |= (u & 0x7F) << y y += 7 if ((u & 0x80) == 0) || (y == 35) { break } } return x, nil }
[ "func", "(", "s", "*", "stream", ")", "readVarUint32", "(", ")", "(", "uint32", ",", "error", ")", "{", "var", "x", ",", "y", "uint32", "\n", "for", "{", "b", ",", "err", ":=", "s", ".", "readByte", "(", ")", "\n", "if", "err", "!=", "nil", "...
// readVarUint32 reads an unsigned 32-bit varint
[ "readVarUint32", "reads", "an", "unsigned", "32", "-", "bit", "varint" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/stream.go#L54-L70
127,886
dotabuff/manta
class.go
onCSVCMsg_ServerInfo
func (p *Parser) onCSVCMsg_ServerInfo(m *dota.CSVCMsg_ServerInfo) error { // This may be needed to parse PacketEntities. p.classIdSize = uint32(math.Log(float64(m.GetMaxClasses()))/math.Log(2)) + 1 // Extract the build from the game dir. matches := gameBuildRegexp.FindStringSubmatch(m.GetGameDir()) if len(matches...
go
func (p *Parser) onCSVCMsg_ServerInfo(m *dota.CSVCMsg_ServerInfo) error { // This may be needed to parse PacketEntities. p.classIdSize = uint32(math.Log(float64(m.GetMaxClasses()))/math.Log(2)) + 1 // Extract the build from the game dir. matches := gameBuildRegexp.FindStringSubmatch(m.GetGameDir()) if len(matches...
[ "func", "(", "p", "*", "Parser", ")", "onCSVCMsg_ServerInfo", "(", "m", "*", "dota", ".", "CSVCMsg_ServerInfo", ")", "error", "{", "// This may be needed to parse PacketEntities.", "p", ".", "classIdSize", "=", "uint32", "(", "math", ".", "Log", "(", "float64", ...
// Internal callback for OnCSVCMsg_ServerInfo.
[ "Internal", "callback", "for", "OnCSVCMsg_ServerInfo", "." ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/class.go#L42-L58
127,887
dotabuff/manta
class.go
onCDemoClassInfo
func (p *Parser) onCDemoClassInfo(m *dota.CDemoClassInfo) error { for _, c := range m.GetClasses() { classId := c.GetClassId() networkName := c.GetNetworkName() class := &class{ classId: classId, name: networkName, serializer: p.serializers[networkName], } p.classesById[class.classId] = cl...
go
func (p *Parser) onCDemoClassInfo(m *dota.CDemoClassInfo) error { for _, c := range m.GetClasses() { classId := c.GetClassId() networkName := c.GetNetworkName() class := &class{ classId: classId, name: networkName, serializer: p.serializers[networkName], } p.classesById[class.classId] = cl...
[ "func", "(", "p", "*", "Parser", ")", "onCDemoClassInfo", "(", "m", "*", "dota", ".", "CDemoClassInfo", ")", "error", "{", "for", "_", ",", "c", ":=", "range", "m", ".", "GetClasses", "(", ")", "{", "classId", ":=", "c", ".", "GetClassId", "(", ")"...
// Internal callback for OnCDemoClassInfo.
[ "Internal", "callback", "for", "OnCDemoClassInfo", "." ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/class.go#L61-L80
127,888
dotabuff/manta
quantizedfloat.go
quantize
func (qfd *quantizedFloatDecoder) quantize(val float32) float32 { if val < qfd.Low { if (qfd.Flags & qff_roundup) == 0 { _panicf("Field tried to quantize an out of range value") } return qfd.Low } else if val > qfd.High { if (qfd.Flags & qff_rounddown) == 0 { _panicf("Field tried to quantize an out of ...
go
func (qfd *quantizedFloatDecoder) quantize(val float32) float32 { if val < qfd.Low { if (qfd.Flags & qff_roundup) == 0 { _panicf("Field tried to quantize an out of range value") } return qfd.Low } else if val > qfd.High { if (qfd.Flags & qff_rounddown) == 0 { _panicf("Field tried to quantize an out of ...
[ "func", "(", "qfd", "*", "quantizedFloatDecoder", ")", "quantize", "(", "val", "float32", ")", "float32", "{", "if", "val", "<", "qfd", ".", "Low", "{", "if", "(", "qfd", ".", "Flags", "&", "qff_roundup", ")", "==", "0", "{", "_panicf", "(", "\"", ...
// Quantize a float
[ "Quantize", "a", "float" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/quantizedfloat.go#L110-L127
127,889
dotabuff/manta
quantizedfloat.go
decode
func (qfd *quantizedFloatDecoder) decode(r *reader) float32 { if (qfd.Flags&qff_rounddown) != 0 && r.readBoolean() { return qfd.Low } if (qfd.Flags&qff_roundup) != 0 && r.readBoolean() { return qfd.High } if (qfd.Flags&qff_encode_zero) != 0 && r.readBoolean() { return 0.0 } return qfd.Low + (qfd.High-qf...
go
func (qfd *quantizedFloatDecoder) decode(r *reader) float32 { if (qfd.Flags&qff_rounddown) != 0 && r.readBoolean() { return qfd.Low } if (qfd.Flags&qff_roundup) != 0 && r.readBoolean() { return qfd.High } if (qfd.Flags&qff_encode_zero) != 0 && r.readBoolean() { return 0.0 } return qfd.Low + (qfd.High-qf...
[ "func", "(", "qfd", "*", "quantizedFloatDecoder", ")", "decode", "(", "r", "*", "reader", ")", "float32", "{", "if", "(", "qfd", ".", "Flags", "&", "qff_rounddown", ")", "!=", "0", "&&", "r", ".", "readBoolean", "(", ")", "{", "return", "qfd", ".", ...
// Actual float decoding
[ "Actual", "float", "decoding" ]
f51563b05e0e19c9ac19196e26455af1782ed3f0
https://github.com/dotabuff/manta/blob/f51563b05e0e19c9ac19196e26455af1782ed3f0/quantizedfloat.go#L130-L144
127,890
fsnotify/fsevents
fsevents.go
DeviceForPath
func DeviceForPath(path string) (int32, error) { stat := syscall.Stat_t{} if err := syscall.Lstat(path, &stat); err != nil { return 0, err } return stat.Dev, nil }
go
func DeviceForPath(path string) (int32, error) { stat := syscall.Stat_t{} if err := syscall.Lstat(path, &stat); err != nil { return 0, err } return stat.Dev, nil }
[ "func", "DeviceForPath", "(", "path", "string", ")", "(", "int32", ",", "error", ")", "{", "stat", ":=", "syscall", ".", "Stat_t", "{", "}", "\n", "if", "err", ":=", "syscall", ".", "Lstat", "(", "path", ",", "&", "stat", ")", ";", "err", "!=", "...
// DeviceForPath returns the device ID for the specified volume.
[ "DeviceForPath", "returns", "the", "device", "ID", "for", "the", "specified", "volume", "." ]
f721bd2b045774a566e8f7f5fa2a9985e04c875d
https://github.com/fsnotify/fsevents/blob/f721bd2b045774a566e8f7f5fa2a9985e04c875d/fsevents.go#L84-L90
127,891
fsnotify/fsevents
fsevents.go
Start
func (es *EventStream) Start() { if es.Events == nil { es.Events = make(chan []Event) } // register eventstream in the local registry for later lookup // in C callback cbInfo := registry.Add(es) es.registryID = cbInfo es.uuid = GetDeviceUUID(es.Device) es.start(es.Paths, cbInfo) }
go
func (es *EventStream) Start() { if es.Events == nil { es.Events = make(chan []Event) } // register eventstream in the local registry for later lookup // in C callback cbInfo := registry.Add(es) es.registryID = cbInfo es.uuid = GetDeviceUUID(es.Device) es.start(es.Paths, cbInfo) }
[ "func", "(", "es", "*", "EventStream", ")", "Start", "(", ")", "{", "if", "es", ".", "Events", "==", "nil", "{", "es", ".", "Events", "=", "make", "(", "chan", "[", "]", "Event", ")", "\n", "}", "\n\n", "// register eventstream in the local registry for ...
// Start listening to an event stream.
[ "Start", "listening", "to", "an", "event", "stream", "." ]
f721bd2b045774a566e8f7f5fa2a9985e04c875d
https://github.com/fsnotify/fsevents/blob/f721bd2b045774a566e8f7f5fa2a9985e04c875d/fsevents.go#L152-L163
127,892
fsnotify/fsevents
fsevents.go
Stop
func (es *EventStream) Stop() { if es.stream != nil { stop(es.stream, es.rlref) es.stream = nil } // Remove eventstream from the registry registry.Delete(es.registryID) es.registryID = 0 }
go
func (es *EventStream) Stop() { if es.stream != nil { stop(es.stream, es.rlref) es.stream = nil } // Remove eventstream from the registry registry.Delete(es.registryID) es.registryID = 0 }
[ "func", "(", "es", "*", "EventStream", ")", "Stop", "(", ")", "{", "if", "es", ".", "stream", "!=", "nil", "{", "stop", "(", "es", ".", "stream", ",", "es", ".", "rlref", ")", "\n", "es", ".", "stream", "=", "nil", "\n", "}", "\n\n", "// Remove...
// Stop listening to the event stream.
[ "Stop", "listening", "to", "the", "event", "stream", "." ]
f721bd2b045774a566e8f7f5fa2a9985e04c875d
https://github.com/fsnotify/fsevents/blob/f721bd2b045774a566e8f7f5fa2a9985e04c875d/fsevents.go#L171-L180
127,893
fsnotify/fsevents
fsevents.go
Restart
func (es *EventStream) Restart() { es.Stop() es.Resume = true es.Start() }
go
func (es *EventStream) Restart() { es.Stop() es.Resume = true es.Start() }
[ "func", "(", "es", "*", "EventStream", ")", "Restart", "(", ")", "{", "es", ".", "Stop", "(", ")", "\n", "es", ".", "Resume", "=", "true", "\n", "es", ".", "Start", "(", ")", "\n", "}" ]
// Restart listening.
[ "Restart", "listening", "." ]
f721bd2b045774a566e8f7f5fa2a9985e04c875d
https://github.com/fsnotify/fsevents/blob/f721bd2b045774a566e8f7f5fa2a9985e04c875d/fsevents.go#L183-L187
127,894
fsnotify/fsevents
wrap.go
fsevtCallback
func fsevtCallback(stream C.FSEventStreamRef, info uintptr, numEvents C.size_t, cpaths **C.char, cflags *C.FSEventStreamEventFlags, cids *C.FSEventStreamEventId) { l := int(numEvents) events := make([]Event, l) es := registry.Get(info) if es == nil { log.Printf("failed to retrieve registry %d", info) return }...
go
func fsevtCallback(stream C.FSEventStreamRef, info uintptr, numEvents C.size_t, cpaths **C.char, cflags *C.FSEventStreamEventFlags, cids *C.FSEventStreamEventId) { l := int(numEvents) events := make([]Event, l) es := registry.Get(info) if es == nil { log.Printf("failed to retrieve registry %d", info) return }...
[ "func", "fsevtCallback", "(", "stream", "C", ".", "FSEventStreamRef", ",", "info", "uintptr", ",", "numEvents", "C", ".", "size_t", ",", "cpaths", "*", "*", "C", ".", "char", ",", "cflags", "*", "C", ".", "FSEventStreamEventFlags", ",", "cids", "*", "C",...
// arguments are released by C at the end of the callback. Ensure copies // are made if data is expected to persist beyond this function ending. // //export fsevtCallback
[ "arguments", "are", "released", "by", "C", "at", "the", "end", "of", "the", "callback", ".", "Ensure", "copies", "are", "made", "if", "data", "is", "expected", "to", "persist", "beyond", "this", "function", "ending", ".", "export", "fsevtCallback" ]
f721bd2b045774a566e8f7f5fa2a9985e04c875d
https://github.com/fsnotify/fsevents/blob/f721bd2b045774a566e8f7f5fa2a9985e04c875d/wrap.go#L46-L70
127,895
fsnotify/fsevents
wrap.go
GetStreamRefPaths
func GetStreamRefPaths(f FSEventStreamRef) []string { arr := C.FSEventStreamCopyPathsBeingWatched(f) l := cfArrayLen(arr) ss := make([]string, l) for i := range ss { void := C.CFArrayGetValueAtIndex(arr, C.CFIndex(i)) ss[i] = cfStringToGoString(C.CFStringRef(void)) } return ss }
go
func GetStreamRefPaths(f FSEventStreamRef) []string { arr := C.FSEventStreamCopyPathsBeingWatched(f) l := cfArrayLen(arr) ss := make([]string, l) for i := range ss { void := C.CFArrayGetValueAtIndex(arr, C.CFIndex(i)) ss[i] = cfStringToGoString(C.CFStringRef(void)) } return ss }
[ "func", "GetStreamRefPaths", "(", "f", "FSEventStreamRef", ")", "[", "]", "string", "{", "arr", ":=", "C", ".", "FSEventStreamCopyPathsBeingWatched", "(", "f", ")", "\n", "l", ":=", "cfArrayLen", "(", "arr", ")", "\n\n", "ss", ":=", "make", "(", "[", "]"...
// GetStreamRefPaths returns a copy of the paths being watched by // this stream
[ "GetStreamRefPaths", "returns", "a", "copy", "of", "the", "paths", "being", "watched", "by", "this", "stream" ]
f721bd2b045774a566e8f7f5fa2a9985e04c875d
https://github.com/fsnotify/fsevents/blob/f721bd2b045774a566e8f7f5fa2a9985e04c875d/wrap.go#L93-L103
127,896
fsnotify/fsevents
wrap.go
copyCFString
func copyCFString(cfs C.CFStringRef) C.CFStringRef { return C.CFStringCreateCopy(C.kCFAllocatorDefault, cfs) }
go
func copyCFString(cfs C.CFStringRef) C.CFStringRef { return C.CFStringCreateCopy(C.kCFAllocatorDefault, cfs) }
[ "func", "copyCFString", "(", "cfs", "C", ".", "CFStringRef", ")", "C", ".", "CFStringRef", "{", "return", "C", ".", "CFStringCreateCopy", "(", "C", ".", "kCFAllocatorDefault", ",", "cfs", ")", "\n", "}" ]
// copyCFString makes an immutable copy of a string with CFStringCreateCopy.
[ "copyCFString", "makes", "an", "immutable", "copy", "of", "a", "string", "with", "CFStringCreateCopy", "." ]
f721bd2b045774a566e8f7f5fa2a9985e04c875d
https://github.com/fsnotify/fsevents/blob/f721bd2b045774a566e8f7f5fa2a9985e04c875d/wrap.go#L139-L141
127,897
fsnotify/fsevents
wrap.go
EventIDForDeviceBeforeTime
func EventIDForDeviceBeforeTime(dev int32, before time.Time) uint64 { tm := C.CFAbsoluteTime(before.Unix()) return uint64(C.FSEventsGetLastEventIdForDeviceBeforeTime(C.dev_t(dev), tm)) }
go
func EventIDForDeviceBeforeTime(dev int32, before time.Time) uint64 { tm := C.CFAbsoluteTime(before.Unix()) return uint64(C.FSEventsGetLastEventIdForDeviceBeforeTime(C.dev_t(dev), tm)) }
[ "func", "EventIDForDeviceBeforeTime", "(", "dev", "int32", ",", "before", "time", ".", "Time", ")", "uint64", "{", "tm", ":=", "C", ".", "CFAbsoluteTime", "(", "before", ".", "Unix", "(", ")", ")", "\n", "return", "uint64", "(", "C", ".", "FSEventsGetLas...
// EventIDForDeviceBeforeTime returns an event ID before a given time.
[ "EventIDForDeviceBeforeTime", "returns", "an", "event", "ID", "before", "a", "given", "time", "." ]
f721bd2b045774a566e8f7f5fa2a9985e04c875d
https://github.com/fsnotify/fsevents/blob/f721bd2b045774a566e8f7f5fa2a9985e04c875d/wrap.go#L147-L150
127,898
fsnotify/fsevents
wrap.go
createPaths
func createPaths(paths []string) (C.CFArrayRef, error) { cPaths := C.ArrayCreateMutable(C.int(len(paths))) var errs []error for _, path := range paths { p, err := filepath.Abs(path) if err != nil { // hack up some reporting errors, but don't prevent execution // because of them errs = append(errs, err) ...
go
func createPaths(paths []string) (C.CFArrayRef, error) { cPaths := C.ArrayCreateMutable(C.int(len(paths))) var errs []error for _, path := range paths { p, err := filepath.Abs(path) if err != nil { // hack up some reporting errors, but don't prevent execution // because of them errs = append(errs, err) ...
[ "func", "createPaths", "(", "paths", "[", "]", "string", ")", "(", "C", ".", "CFArrayRef", ",", "error", ")", "{", "cPaths", ":=", "C", ".", "ArrayCreateMutable", "(", "C", ".", "int", "(", "len", "(", "paths", ")", ")", ")", "\n", "var", "errs", ...
// createPaths accepts the user defined set of paths and returns FSEvents // compatible array of paths
[ "createPaths", "accepts", "the", "user", "defined", "set", "of", "paths", "and", "returns", "FSEvents", "compatible", "array", "of", "paths" ]
f721bd2b045774a566e8f7f5fa2a9985e04c875d
https://github.com/fsnotify/fsevents/blob/f721bd2b045774a566e8f7f5fa2a9985e04c875d/wrap.go#L154-L172
127,899
fsnotify/fsevents
wrap.go
makeCFString
func makeCFString(str string) C.CFStringRef { s := C.CString(str) defer C.free(unsafe.Pointer(s)) return C.CFStringCreateWithCString(C.kCFAllocatorDefault, s, C.kCFStringEncodingUTF8) }
go
func makeCFString(str string) C.CFStringRef { s := C.CString(str) defer C.free(unsafe.Pointer(s)) return C.CFStringCreateWithCString(C.kCFAllocatorDefault, s, C.kCFStringEncodingUTF8) }
[ "func", "makeCFString", "(", "str", "string", ")", "C", ".", "CFStringRef", "{", "s", ":=", "C", ".", "CString", "(", "str", ")", "\n", "defer", "C", ".", "free", "(", "unsafe", ".", "Pointer", "(", "s", ")", ")", "\n", "return", "C", ".", "CFStr...
// makeCFString makes an immutable string with CFStringCreateWithCString.
[ "makeCFString", "makes", "an", "immutable", "string", "with", "CFStringCreateWithCString", "." ]
f721bd2b045774a566e8f7f5fa2a9985e04c875d
https://github.com/fsnotify/fsevents/blob/f721bd2b045774a566e8f7f5fa2a9985e04c875d/wrap.go#L175-L179