Skip to content

Instantly share code, notes, and snippets.

@ssebastianoo
Created January 13, 2023 19:08
Show Gist options
  • Select an option

  • Save ssebastianoo/d74e1b83db0c9799b4619d9296721f74 to your computer and use it in GitHub Desktop.

Select an option

Save ssebastianoo/d74e1b83db0c9799b4619d9296721f74 to your computer and use it in GitHub Desktop.
the no hello simulator
package main
import (
"fmt"
"log"
"os"
"path/filepath"
"strconv"
"time"
)
func main() {
homeDir, _ := os.UserHomeDir()
for i := 1; true; i++ {
file, err := os.Create(filepath.Join(homeDir, "desktop", fmt.Sprintf("ciao%s.txt", strconv.Itoa(i))))
if err != nil {
log.Fatal(err)
}
defer file.Close()
file.WriteString("ciao")
fmt.Println("ciao")
time.Sleep(1 * time.Second)
}
}
@chickenmatty
Copy link

ciao

@chickenmatty
Copy link

ciao

@ssebastianoo
Copy link
Author

ciao

@LukeGotBored
Copy link

ciao

@infinit7even
Copy link

ciao

@ssebastianoo
Copy link
Author

ciao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment