basic boilerplate
Signed-off-by: Sarmonsiill <sarmonsiill@tilde.institute>
This commit is contained in:
parent
2b00a4f9e0
commit
a55dbd0b42
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.*.swp
|
8
go.mod
Normal file
8
go.mod
Normal file
|
@ -0,0 +1,8 @@
|
|||
module tildegit.org/sarmonsiill/guruReg
|
||||
|
||||
go 1.16
|
||||
|
||||
require (
|
||||
github.com/jcelliott/lumber v0.0.0-20160324203708-dd349441af25 // indirect
|
||||
github.com/nanobox-io/golang-scribble v0.0.0-20190309225732-aa3e7c118975 // indirect
|
||||
)
|
4
go.sum
Normal file
4
go.sum
Normal file
|
@ -0,0 +1,4 @@
|
|||
github.com/jcelliott/lumber v0.0.0-20160324203708-dd349441af25 h1:EFT6MH3igZK/dIVqgGbTqWVvkZ7wJ5iGN03SVtvvdd8=
|
||||
github.com/jcelliott/lumber v0.0.0-20160324203708-dd349441af25/go.mod h1:sWkGw/wsaHtRsT9zGQ/WyJCotGWG/Anow/9hsAcBWRw=
|
||||
github.com/nanobox-io/golang-scribble v0.0.0-20190309225732-aa3e7c118975 h1:zm/Rb2OsnLWCY88Njoqgo4X6yt/lx3oBNWhepX0AOMU=
|
||||
github.com/nanobox-io/golang-scribble v0.0.0-20190309225732-aa3e7c118975/go.mod h1:4Mct/lWCFf1jzQTTAaWtOI7sXqmG+wBeiBfT4CxoaJk=
|
27
guruReg.go
Normal file
27
guruReg.go
Normal file
|
@ -0,0 +1,27 @@
|
|||
package main
|
||||
|
||||
import "fmt"
|
||||
import "github.com/nanobox-io/golang-scribble"
|
||||
|
||||
type Account struct {
|
||||
Username string
|
||||
Email string
|
||||
Pubkey string
|
||||
}
|
||||
|
||||
func main() {
|
||||
fmt.Println("hej")
|
||||
acc := Account{
|
||||
Username: "david",
|
||||
Email: "david@example.org",
|
||||
Pubkey: "test123",
|
||||
}
|
||||
db, err := scribble.New("data", nil)
|
||||
if err != nil {
|
||||
fmt.Println("Error", err)
|
||||
}
|
||||
if err := db.Write("acc", "david", acc); err != nil {
|
||||
fmt.Println("Error", err)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user