We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This could be old documentation from an older version, but it no longer works and I'm including the reason and solution:
First download with go get -u github.com/miketheprogrammer/go-thrust/
go get -u github.com/miketheprogrammer/go-thrust/
package main import ( "github.com/miketheprogrammer/go-thrust/dispatcher" "github.com/miketheprogrammer/go-thrust/spawn" "github.com/miketheprogrammer/go-thrust/window" ) func main() { spawn.Run() thrustWindow := window.NewWindow("http://breach.cc/", nil) thrustWindow.Show() thrustWindow.Maximize() thrustWindow.Focus() dispatcher.RunLoop() }
thrustWindow := window.NewWindow("http://breach.cc/", nil)
window.NewWindow() does not accept string type for the first parameter, but a new struct: "Options"
window.go
type Options struct { RootUrl string Size SizeHW Title string IconPath string HasFrame bool Session *session.Session }
commands.go
type SizeHW struct { Width uint `json:"width,omitempty"` Height uint `json:"height,omitempty"` }
By providing a struct for window.NewWindow() you can solve this issue.
import ( "github.com/miketheprogrammer/go-thrust/lib/dispatcher" "github.com/miketheprogrammer/go-thrust/lib/spawn" "github.com/miketheprogrammer/go-thrust/lib/bindings/window" "github.com/miketheprogrammer/go-thrust/lib/commands" // NEW: Required struct SizeHW ) func main() { spawn.Run() //thrustWindow := window.NewWindow("http://breach.cc/", nil) // OLD thrustSize := commands.SizeHW{Width:1024, Height: 768} // NEW: SizeHW struct thrustOptions := window.Options{RootUrl:"http://www.google.com/", Size: thrustSize} // NEW: Options struct thrustWindow := window.NewWindow(thrustOptions) // NEW: Using the options thrustWindow.Show() thrustWindow.Maximize() thrustWindow.Focus() dispatcher.RunLoop() }
This is tested under Windows 10.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Flaw in Go Documentation
This could be old documentation from an older version, but it no longer works and I'm including the reason and solution:
From the README.md
First download with
go get -u github.com/miketheprogrammer/go-thrust/
Problem
window.NewWindow() does not accept string type for the first parameter, but a new struct: "Options"
window.go
commands.go
By providing a struct for window.NewWindow() you can solve this issue.
Example Solution
This is tested under Windows 10.
The text was updated successfully, but these errors were encountered: