Back to Home

Basics

Build Tools

  • Dependency Management dep

Build Tools:

Web Frameworks

Rest Frameworks

Integration Framework

  • Serf haicorp's tools for datacenter
  • flogo Tibco community

Libraries

  • NSQ is a realtime distributed messaging platform designed to operate at scale, handling billions of messages per day.
  • textql write structured queries against csv(tsv) text
  • Gogs painless way to set up a self-hosted Git service. With Go, this can be done in independent binary distribution across ALL platforms == Editors and Apps ==
  • Lime a Go-ish clone of Sublime

handling xml, json

Testing

DB

  • Boltdb key value store for Go
  • Cayley graph database
  • Etcd A highly-available key value store for shared configuration and service discovery developed as part of coreos
  • influxdb Scalable datastore for metrics, events, and real-time analytics
  • cockroachdb A Scalable, Geo-Replicated, Transactional Datastore

Postgres

package main
 
import (
//"database/sql"
"fmt"
"log"
)
 
import (
_ "github.com/lxn/go-pgsql"
	"runtime/debug"
	"github.com/lxn/go-pgsql"
	"os"
)
 
func main() {
	println("Running.. ")
	db, err := pgsql.Connect("dbname=waitrose user=postgres password=xxxxx hostname=localhost timeout=3 port=5432", pgsql.LogError)
 
	if err != nil {
		log.Fatal("Failed to connect to the DB")
		log.Fatal(err)
	}
 
	defer db.Close()
 
	println("Running query ")
	rs, err := db.Query("SELECT * from raw_promotion;")
 
	if err != nil {
		log.Fatal("Error creating query :", err)
		debug.PrintStack()
	}
	defer rs.Close()
 
	for {
		hasRow, err := rs.FetchNext()
		if err != nil {
			os.Exit(1)
		}
		if hasRow {
			num, _, _ := rs.Int(0)
			body, _, _ := rs.String(2)
 
			fmt.Println("id:", num, "body:", body)
		} else {
			hasResult, err := rs.NextResult()
			if err != nil {
				os.Exit(1)
			}
			if !hasResult {
				break
			}
			fmt.Println("next result")
		}
	}
 
 
}

Video - Mpeg

CLI

 
go_language_notes.txt · Last modified: 2018/08/30 01:56 by root
 
RSS - 200 © CrosswireDigitialMedia Ltd