func updateMainFile(path string) {
	path = phracked.temp + "/" + path
	mainView, err := g.View("main")
	if err != nil {
		cleanFatal(err)
	}
	b, err := ioutil.ReadFile(path)
	if err != nil {
		mainView.Clear()
		fmt.Fprintf(mainView, "Can't find file...")
	} else {
		mainView.Clear()
		mainView.SetCursor(0, 0)
		mainView.SetOrigin(0, 0)
		fmt.Fprintf(mainView, "%s", b)
		if err := g.SetCurrentView("main"); err != nil {
			cleanFatal(err)
		}
	}
}
/**
 * Updates the Main view with phracked file.
 */
Updates the Main view with phracked file.
/ ** * Updates the Main view with phracked file . * /
func updateMainFile(path string) {
	path = phracked.temp + "/" + path
	mainView, err := g.View("main")
	if err != nil {
		cleanFatal(err)
	}
	b, err := ioutil.ReadFile(path)
	if err != nil {
		mainView.Clear()
		fmt.Fprintf(mainView, "Can't find file...")
	} else {
		mainView.Clear()
		mainView.SetCursor(0, 0)
		mainView.SetOrigin(0, 0)
		fmt.Fprintf(mainView, "%s", b)
		if err := g.SetCurrentView("main"); err != nil {
			cleanFatal(err)
		}
	}
}
func updateMainFile ( path string ) { path = phracked . temp + " " + path mainView , err := g . View ( " " ) if err != nil { cleanFatal ( err ) } b , err := ioutil . ReadFile ( path ) if err != nil { mainView . Clear ( ) fmt . Fprintf ( mainView , " " ) } else { mainView . Clear ( ) mainView . SetCursor ( 0 , 0 ) mainView . SetOrigin ( 0 , 0 ) fmt . Fprintf ( mainView , " " , b ) if err := g . SetCurrentView ( " " ) ; err != nil { cleanFatal ( err ) } } }
Updates the Main view with phracked file.
Updates the Main view with phracked file .