Hello, This's a Golang web forum!
This site is build with golang and bolt.
Go for Web Development
With enhanced memory performance and support for several IDEs, Go powers fast and scalable web applications.
Go Hello
package main
import "fmt"
func main() {
fmt.Println("Hello, world!")
}
Bolt Database
Bolt is an embedded key/value database for Go, which is a pure Go key/value store inspired by Howard Chu's LMDB project
Bolt Hello
db.Update(func(tx *bolt.Tx) error {
b := tx.Bucket([]byte("MyBucket"))
err := b.Put([]byte("answer"), []byte("42"))
return err
})
db.View(func(tx *bolt.Tx) error {
b := tx.Bucket([]byte("MyBucket"))
v := b.Get([]byte("answer"))
fmt.Printf("The answer is: %s\n", v)
return nil
})
1
See Also
- Do net.Conn unit test using net.Pipe in Golang
- Golang upnp/ssdp DiscoverDevices example
- LRU Cache Implementation in Golang With container/list
- Generate User's Avatars with Pure Golang
- Golang gracefully stop a tcp server
Bolt allows only one read-write transaction at a time, this site all CRUD are use transaction.