News for hackers. Stuff that matters.
Re:Optimizing Go string operations with practical examples by icholy on Sunday December 03, 2023 @06:31AM (#38506299)
You can clean up this code by writing a package for generating JSON token by token.

    w := jsonx.New(os.Stdout)
    w.OpenObject()
    w.ObjectKey("commit")
    w.Int(0)
    w.CloseObject()
Re:Optimizing Go string operations with practical examples by costco on Sunday December 03, 2023 @12:31PM (#38508858)
Good point. I only have the ugly code in a few places so I debated whether doing something like this would be worth it or not. It probably is.
Re:Optimizing Go string operations with practical examples by icholy on Monday December 04, 2023 @05:06PM (#38523834)
I only switched mine once a second dev joined the project.