Skip to content

Instantly share code, notes, and snippets.

View ivancorrales's full-sized avatar
🐾
Doing what I love to do!

Iván Corrales Solera ivancorrales

🐾
Doing what I love to do!
View GitHub Profile
go mod init mollydb
go mod tidy
module mollydb
require (
  github.com/boltdb/bolt v0.0.0–20180302180052-fd01fc79c553
  github.com/fsnotify/fsnotify v1.4.7
  github.com/go-yaml/yaml v0.0.0–20140922213225-bec87e4332ae
  github.com/graphql-go/graphql v0.0.0–20180324214652–8ab5400ff77c
  github.com/graphql-go/handler v0.0.0–20180312211735-df717460db9a
github.com/graphql-go/relay v0.0.0–20171208134043–54350098cfe5
  golang.org/x/net v0.0.0–20180320002117–6078986fec03
  golang.org/x/sys v0.0.0–20180318190847–01acb38716e0
go mod init mollydb
rm -rf src/mollydb/vendor
mv src/mollydb/* .
@ivancorrales
ivancorrales / clone.sh
Created December 17, 2018 19:23
clone repo
git clone https://github.com/wesovilabs/mollydb.git
cd mollydb; 
git checkout -b feature/using-go-mods
@ivancorrales
ivancorrales / sample.go
Last active December 15, 2018 10:13
Combine operations
package main
import (
"fmt"
"github.com/wesovilabs/koazee"
"strings"
)
type Person struct {
Name string
@ivancorrales
ivancorrales / sample.go
Created December 15, 2018 09:27
streamOf
package main
import (
"fmt"
"github.com/wesovilabs/koazee"
)
var numbers = []int{1, 5, 4, 3, 2, 7, 1, 8, 2, 3}
func main() {
@ivancorrales
ivancorrales / sample.go
Created December 15, 2018 09:24
stream.Reduce
package main
import (
"fmt"
"github.com/wesovilabs/koazee"
)
var numbers = []int{1, 5, 4, 3, 2, 7, 1, 8, 2, 3}
func main() {
@ivancorrales
ivancorrales / sample.go
Created December 15, 2018 09:15
stream.Map
package main
import (
"fmt"
"github.com/wesovilabs/koazee"
"strings"
)
var animals = []string{"lynx", "dog", "cat", "monkey", "dog", "fox", "tiger", "lion"}
@ivancorrales
ivancorrales / sample.go
Created December 15, 2018 09:04
stream.ForEach
package main
import (
"fmt"
"github.com/wesovilabs/koazee"
)
type message struct {
user string
message string