79440528

Date: 2025-02-14 20:46:07
Score: 1.5
Natty:
Report link

So you want to get rid of all things good in Go and make it behave like an oldschool C program?

package main

import (
    "fmt"
    "os"
    "runtime"
    "runtime/debug"
)

func main() {
    runtime.GOMAXPROCS(1)  // limit to one logical processor
    runtime.LockOSThread()  // pin execution to a single OS thread
    debug.SetGCPercent(-1)  // disable automatic GC

    fmt.Println("good old day feelings start here")
    // ...
}
Reasons:
  • Has code block (-0.5):
  • Ends in question mark (2):
Posted by: Ian Carter