JOSE is a comprehensive set of JWT, JWS, and JWE libraries.
go get github.com/SermoDigital/jose| package main | |
| import ( | |
| "fmt" | |
| "golang.org/x/net/context" | |
| "log" | |
| "net/http" | |
| "os" | |
| ) |
| package main | |
| import "fmt" | |
| func main() { | |
| ch := make(chan string) | |
| go func(c chan string) { | |
| ch <- "Hello Gopher" | |
| }(ch) |
| <?php | |
| $dom = simplexml_load_string( | |
| '<root> | |
| <langage>PHP</langage> | |
| <version>7</version> | |
| <parent> | |
| <version>5</version> | |
| </parent> | |
| </root>' |
| // Copyright 2016 Vincent Letourneau. | |
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| ) | |
| func AuthMiddleware(next http.Handler) http.Handler { |
| // Copyright 2016 The Nanoninja Authors. All rights reserved. | |
| package main | |
| import ( | |
| "io" | |
| "log" | |
| "os" | |
| ) |
| package service | |
| import ( | |
| "fmt" | |
| "sync" | |
| ) | |
| type key int | |
| type Service func() interface{} |
| // http.Flusher example | |
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "time" | |
| ) |
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| ) | |
| func main() { | |
| TimeDisplay(true) | |
| } |
| // Simple Chat Server. It does not broadcast to other people. | |
| // It can be used to create a bot. | |
| package main | |
| import ( | |
| "bufio" | |
| "fmt" | |
| "io" | |
| "log" | |
| "net" |