https://github.com/reiver/go-webui
Package webui enables an application written in the Go programming language (i.e., Golang) to create a user interface (UI) using Web technologies, such HTML, CSS, JavaScript, WebAssembly, WebRTC, etc etc etc.
https://github.com/reiver/go-webui
css frontend golang html javascript ui web webassembly webrtc
Last synced: 3 months ago
JSON representation
Package webui enables an application written in the Go programming language (i.e., Golang) to create a user interface (UI) using Web technologies, such HTML, CSS, JavaScript, WebAssembly, WebRTC, etc etc etc.
- Host: GitHub
- URL: https://github.com/reiver/go-webui
- Owner: reiver
- Created: 2019-06-09T07:49:00.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-09T23:18:47.000Z (about 7 years ago)
- Last Synced: 2025-08-14T16:46:15.960Z (10 months ago)
- Topics: css, frontend, golang, html, javascript, ui, web, webassembly, webrtc
- Language: Go
- Size: 12.7 KB
- Stars: 9
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# go-webui
Package **webui** enables an application written in the Go programming language (i.e., Golang) to create a **user interface** (**UI**) using Web technologies, such HTML, CSS, JavaScript, WebAssembly, WebRTC, etc etc etc.
## Documention
Online documentation, which includes examples, can be found at: http://godoc.org/github.com/reiver/go-webui
[](https://godoc.org/github.com/reiver/go-webui)
## Hello World Example
A "hello world" example for using **webui** is:
```go
import "github.com/reiver/go-webui"
// ...
err := webui.LaunchAndServeString("Hello world!")
```
Or:
```go
import "github.com/reiver/go-webui"
// ...
err := webui.Launch("data:,Hello%20world!")
```
## More Realistic Example
A _more realistic_ example would probably have you (the programmer) create one or more `http.Handler`.
The `http.Handler` would serve the content that is shows in the Web UI.
Such as in:
```go
import "github.com/reiver/go-webui"
// ...
func serveHttp(w http.ResponseWriter, r *http.Request) {
// ...
}
// ...
var handler http.Handler = http.HandlerFunc(serveHttp)
// ...
err := webui.LaunchAndServe(handler)
```
In other words, use can use many of the same tools you use to create Web applications, to create a desktop UI.