2808 explained code solutions for 75 technologies


golangHow to implement while...true loop


package main

func main() {
  for {
    // repeat something infinitely
  }
}ctrl + c
package main

default package declaration

func main() {

declare main function that will be launched automatically

for {

empty for loop will repeat given body forever (identical to while...true in other languages)