Skip to content

Instantly share code, notes, and snippets.

@macalinao
Created September 14, 2016 21:40
Show Gist options
  • Save macalinao/7c2299be113c0e5c5ece6a74172a985a to your computer and use it in GitHub Desktop.
Save macalinao/7c2299be113c0e5c5ece6a74172a985a to your computer and use it in GitHub Desktop.
func makeQuotientSubscalarStringMap(ss map[string]*apb.MatchSum_Subscalars, plays float64) map[string]*apb.MatchQuotient_Subscalars {
// goddamit go
// no fucking generics
// fucking piece of shit
ret := map[string]*apb.MatchQuotient_Subscalars{}
for key, s := range ss {
ret[key] = makeQuotientSubscalars(s, plays)
}
return ret
}
func makeQuotientSubscalarUint32Map(ss map[uint32]*apb.MatchSum_Subscalars, plays float64) map[uint32]*apb.MatchQuotient_Subscalars {
// goddamit go
// no fucking generics
// fucking piece of shit
ret := map[uint32]*apb.MatchQuotient_Subscalars{}
for key, s := range ss {
ret[key] = makeQuotientSubscalars(s, plays)
}
return ret
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment