Your repository has two commits:
$ git log --oneline
957fbfb No, I am your father.
9bb71ff A long time ago in a galaxy far, far away....
package main | |
import ( | |
"fmt" | |
"net/http" | |
"github.com/gorilla/websocket" | |
) | |
func echo(w http.ResponseWriter, r *http.Request) { |
<html> | |
<head> | |
<title>WebSocket demo</title> | |
</head> | |
<body> | |
<div> | |
<form> | |
<label for="numberfield">Number</label> | |
<input type="text" id="numberfield" placeholder="12"/><br /> |
$ go test -bench . -benchmem | |
goos: linux | |
goarch: amd64 | |
pkg: github.com/knsh14/sample | |
BenchmarkBytesBuffer-2 10 103512777 ns/op 438779214 B/op 23 allocs/op | |
BenchmarkStringBuilder-2 10 138950789 ns/op 661977072 B/op 54 allocs/op | |
BenchmarkBytesBufferString-2 5000000 353 ns/op 1280 B/op 1 allocs/op | |
BenchmarkStringBuilderString-2 2000000000 0.33 ns/op 0 B/op 0 allocs/op | |
PASS | |
ok github.com/knsh14/sample 5.699s |
package main | |
import ( | |
"fmt" | |
"github.com/julienschmidt/httprouter" | |
"log" | |
"net/http" | |
) | |
// The type of our middleware consists of the original handler we want to wrap and a message |
For Go projects that consist of only one package, the following Travis configuration is enough to get started with coveralls.io. You may want to encrypt your $COVERALLS_TOKEN
via Travis encryption keys though.
language: go
go:
- 1.3.1
{"version":1,"resource":"file:///Users/alphawong/works/src/github.com/hanksmak/ibrilli/package.json","entries":[{"id":"iBrt.json","timestamp":1659415552224}]} |
package main | |
import ( | |
"log" | |
"os" | |
"strings" | |
"text/template" | |
) | |
type myStr string |
// haversin(θ) function | |
func hsin(theta float64) float64 { | |
return math.Pow(math.Sin(theta/2), 2) | |
} | |
// Distance function returns the distance (in meters) between two points of | |
// a given longitude and latitude relatively accurately (using a spherical | |
// approximation of the Earth) through the Haversin Distance Formula for | |
// great arc distance on a sphere with accuracy for small distances | |
// |