wip
This commit is contained in:
@@ -19,7 +19,7 @@ func TrimSuffix(s, suffix string) string {
|
|||||||
func main() {
|
func main() {
|
||||||
var searchPath []string
|
var searchPath []string
|
||||||
searchPath = append(searchPath,
|
searchPath = append(searchPath,
|
||||||
"/home/starkers/.local/share/Steam/steamapps/compatdata/8500/pfx/drive_c/users/steamuser/My Documents/EVE/logs/Chatlogs")
|
"~/.local/share/Steam/steamapps/compatdata/8500/pfx/drive_c/users/steamuser/My Documents/EVE/logs/Chatlogs")
|
||||||
|
|
||||||
usr, _ := user.Current()
|
usr, _ := user.Current()
|
||||||
dir := usr.HomeDir
|
dir := usr.HomeDir
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/hpcloud/tail"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
|
||||||
|
// https://godoc.org/github.com/hpcloud/tail#Config
|
||||||
|
t, err := tail.TailFile(
|
||||||
|
"/var/log/nginx.log",
|
||||||
|
tail.Config{
|
||||||
|
Follow: true,
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
|
fmt.Println(err)
|
||||||
|
}
|
||||||
|
for line := range t.Lines {
|
||||||
|
fmt.Println(line.Text)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fyne.io/fyne/app"
|
||||||
|
"fyne.io/fyne/widget"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
a := app.New()
|
||||||
|
w := a.NewWindow("window title")
|
||||||
|
|
||||||
|
w.SetContent(widget.NewLabel("widget label"))
|
||||||
|
w.ShowAndRun()
|
||||||
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
Good notes on file handling:
|
||||||
|
|
||||||
|
- https://flaviocopes.com/go-list-files/
|
||||||
Reference in New Issue
Block a user