Arquivo da categoria: Go

Golang – Print de struct

//play.golang.org/p/zSJ6DuM1fOm

package main

import (
“fmt”
“reflect”
)

func main() {
type T struct {
Armando int
Gay string
}

t := T{23, "skidoo"}
s := reflect.ValueOf(&t).Elem()
typeOfT := s.Type()

for i := 0; i < s.NumField(); i++ {
    f := s.Field(i)
    fmt.Printf("%d: %s %s = %v\n", i,
        typeOfT.Field(i).Name, f.Type(), f.Interface())
}

}

DOCKER, REVEL, AND APP ENGINE

//jbeckwith.com/2015/05/08/docker-revel-appengine/

Golang security checker

Tiny cross-platform webview library for C/C++/Golang. Uses WebKit (Gtk/Cocoa) and MSHTML (Windows)