1. Ross Light
  2. stackexchange
  3. Pull requests

Pull requests

#2 Merged
Repository
stulentsev
Branch
default
Repository
zombiezen
Branch
default

Add more nil checks. Remove unused code.

Author
  1. Sergio Tulentsev
Reviewers
Description
No description

Comments (4)

  1. Sergio Tulentsev author

    Wait. That JoinIDs was an exported method. So I probably shouldn't have deleted that. But isn't the implementation a bit strange? We have strings.Join.

    I'm very new to Go. Please, bear with me. :)

    1. Ross Light repo owner

      Please don't delete it, my code uses it.

      The reason is that the IDs come in as ints, and need to be converted to strings. JoinIDs only performs two allocations: one for the byte slice and one for the string. If I converted all the ints to strings and then joined them, that would perform N allocations.