Skip to content

Commit

Permalink
Update personal lorca fork version, add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidArthurCole committed Jul 20, 2024
1 parent 0682f30 commit 847b99d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 25 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.1
1.6.1-beta.2-DEBUG
2 changes: 1 addition & 1 deletion data.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var _dbPath string
func dataInit() {
_dbPath = filepath.Join(_internalDir, "data.db")
if err := db.InitDB(_dbPath); err != nil {
log.Fatal(err)
log.Fatal("dataInit() err: ", err)
}
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.22.1

require (
github.com/andybrewer/mack v0.0.0-20220307193339-22e922cc18af
github.com/davidarthurcole/lorca v0.1.7
github.com/davidarthurcole/lorca v0.1.8
github.com/dustin/go-humanize v1.0.1
github.com/golang-migrate/migrate/v4 v4.17.0
github.com/hashicorp/go-version v1.6.0
Expand Down
14 changes: 2 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ github.com/andybrewer/mack v0.0.0-20220307193339-22e922cc18af/go.mod h1:oUO968BJ
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davidarthurcole/lorca v0.1.7 h1:wu3mMLTnvnuI5kA/yreEZngptbJ86uikBmlHDoQehrw=
github.com/davidarthurcole/lorca v0.1.7/go.mod h1:x5K58id3vC7mm+C5Q+gvxpHPxGMcm6QgqH/aFm9+SMo=
github.com/davidarthurcole/lorca v0.1.8 h1:QBH9bDfgvwgIjuPGcHn9QPvYxtc8EN8/ATuBwzuuogE=
github.com/davidarthurcole/lorca v0.1.8/go.mod h1:x5K58id3vC7mm+C5Q+gvxpHPxGMcm6QgqH/aFm9+SMo=
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
github.com/golang-migrate/migrate/v4 v4.17.0 h1:rd40H3QXU0AA4IoLllFcEAEo9dYKRHYND2gB4p7xcaU=
Expand Down Expand Up @@ -41,8 +41,6 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk=
github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
github.com/xuri/efp v0.0.0-20231025114914-d1ff6096ae53 h1:Chd9DkqERQQuHpXjR/HSV1jLZA6uaoiwwH3vSuF3IW0=
github.com/xuri/efp v0.0.0-20231025114914-d1ff6096ae53/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d h1:llb0neMWDQe87IzJLS4Ci7psK/lVsjIS2otl+1WyRyY=
github.com/xuri/efp v0.0.0-20240408161823-9ad904a10d6d/go.mod h1:ybY/Jr0T0GTCnYjKqmdwxyxn2BQf2RcQIIvex5QldPI=
github.com/xuri/excelize/v2 v2.8.1 h1:pZLMEwK8ep+CLIUWpWmvW8IWE/yxqG0I1xcN6cVMGuQ=
Expand All @@ -51,23 +49,15 @@ github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7 h1:hPVCafDV85blFTabnqKgNh
github.com/xuri/nfp v0.0.0-20240318013403-ab9948c2c4a7/go.mod h1:WwHg+CVyzlv/TX9xqBFXEZAuxOPxn2k1GNHwG41IIUQ=
go.uber.org/atomic v1.11.0 h1:ZvwS0R+56ePWxUNi+Atn9dWONBPp/AUETXlHW0DxSjE=
go.uber.org/atomic v1.11.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
golang.org/x/image v0.14.0 h1:tNgSxAFe3jC4uYqvZdTr84SZoM1KfwdC9SKIFrLjFn4=
golang.org/x/image v0.14.0/go.mod h1:HUYqC05R2ZcZ3ejNQsIHQDQiwWM4JBqmm6MKANTp4LE=
golang.org/x/net v0.22.0 h1:9sGLhx7iRIHEiX0oAJ3MRZMUCElJgy7Br1nO+AMN3Tc=
golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/net v0.24.0 h1:1PcaxkF854Fu3+lvBIx5SYn9wRlBzzcnHZSiaFFAb0w=
golang.org/x/net v0.24.0/go.mod h1:2Q7sJY5mzlzWjKtYUEXSlBWCdyaioyXzRB2RtU8KVE8=
golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M=
golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
Expand Down
20 changes: 10 additions & 10 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ type UI struct {
func (u UI) MustLoad(url string) {
err := u.Load(url)
if err != nil {
log.Fatal(err)
log.Fatal("MustLoad err: ", err)
}
}

func (u UI) MustBind(name string, f interface{}) {
err := u.Bind(name, f)
if err != nil {
log.Fatal(err)
log.Fatal("MustBind err: ", err)
}
}

Expand Down Expand Up @@ -196,11 +196,11 @@ func init() {

path, err := os.Executable()
if err != nil {
log.Fatal(err)
log.Fatal("os.Executable() err: ", err)
}
path, err = filepath.EvalSymlinks(path)
if err != nil {
log.Fatal(err)
log.Fatal("filepath.EvalSymlinks() err: ", err)
}
_rootDir = filepath.Dir(path)
if runtime.GOOS == "darwin" {
Expand Down Expand Up @@ -251,7 +251,7 @@ func init() {
}

if err := os.MkdirAll(_internalDir, 0755); err != nil {
log.Fatal(err)
log.Fatal("MkdirAll err: ", err)
}
if err := hide(_internalDir); err != nil {
log.Errorf("error hiding internal directory: %s", err)
Expand All @@ -277,7 +277,7 @@ func init() {
}

if _eiAfxConfigErr != nil {
log.Fatal(_eiAfxConfigErr)
log.Fatal("_eiAfxConfigErr: ", _eiAfxConfigErr)
} else {
_eiAfxConfigMissions = eiafx.Config.MissionParameters
_eiAfxConfigArtis = eiafx.Config.ArtifactParameters
Expand Down Expand Up @@ -471,7 +471,7 @@ func main() {
}()
u, err := lorca.New("", "", chrome, widthPreference, heightPreference, args...)
if err != nil {
log.Fatal(err)
log.Fatal("lorca err: ", err)
}
ui := UI{u}
defer ui.Close()
Expand Down Expand Up @@ -1142,7 +1142,7 @@ func main() {

ln, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
log.Fatal(err)
log.Fatal("tcp err: ", err)
}
defer ln.Close()
go func() {
Expand All @@ -1152,13 +1152,13 @@ func main() {
} else {
wwwfs, err := fs.Sub(_fs, "www")
if err != nil {
log.Fatal(err)
log.Fatal("wwwfs err: ", err)
}
httpfs = http.FS(wwwfs)
}
err := http.Serve(ln, http.FileServer(httpfs))
if err != nil {
log.Fatal(err)
log.Fatal("httpServe err: ", err)
}
}()
ui.MustLoad(fmt.Sprintf("http://%s/", ln.Addr()))
Expand Down

0 comments on commit 847b99d

Please sign in to comment.