golang-在空的bash窗口中打开文件

lets say I have this code:

package main 

import (
     "io/ioutil" 
     "fmt"
)
func check(err error) {
     if err != nil {
         panic(err)
     }
} 
func main() {
     file, err := ioutil.ReadFile("test.txt")
     check(err)
     fmt.Print(string(file))
}

when running it with go run I want it to be written in a cleared bash window. Is it possible to do so without using any additional open-source repositories?

Thanks in advance.

If clearing the terminal is truly part of your program's responsibility then check out the answers in this question How can I clear the terminal screen in Go?

However if you're just wanting to clear the screen as part of your development process then I would keep it simple and do something like this

clear && go run *.go