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
@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 / 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
rm -rf src/mollydb/vendor
mv src/mollydb/* .
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
go mod tidy
module mollydb
require (
  github.com/fsnotify/fsnotify v1.4.7
  github.com/go-chi/chi v3.3.3+incompatible
  github.com/graphql-go/graphql v0.7.7
  github.com/graphql-go/handler v0.2.2
  github.com/graphql-go/relay v0.0.0–20171208134043–54350098cfe5
  github.com/kr/pretty v0.1.0 // indirect
  github.com/sirupsen/logrus v1.2.0
  github.com/stretchr/testify v1.2.2
go mod init mollydb
@ivancorrales
ivancorrales / create-goproject.sh
Last active December 26, 2018 22:25
This script initializes a go project
export PROJECT=go-demo
export MODULE=github.com/wesovilabs/go-demo
mkdir $PROJECT
cd $PROJECT
go mod init $MODULE
@ivancorrales
ivancorrales / README.md
Last active December 27, 2018 07:23
A nice example of README.md for your project

[](--- badges go here ---)

Project Title

One or more paragraphs of project description goes here

Getting Started

Installing

package main
import (
"fmt"
"github.com/wesovilabs/koazee"
"koazee-examples-v2/model"
)
// Print the albums sorted by the number of tracks