Create the password protected root certificate key and self sign this certificate
openssl genrsa -des3 -out rootCA.key 2048
openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.pem
//hello.go | |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"net/http" | |
) | |
func handler(writer http.ResponseWriter, request *http.Request) { |
package main | |
import "fmt" | |
//Listener is a | |
type Listener struct { | |
ID int | |
} | |
//ListenerInterface is an |
Create the password protected root certificate key and self sign this certificate
openssl genrsa -des3 -out rootCA.key 2048
openssl req -x509 -new -nodes -key rootCA.key -sha256 -days 1024 -out rootCA.pem
package time_profile | |
import "time" | |
func timeAfter() chan struct{} { | |
ch := make(chan struct{}) | |
go timeAfterGoroutine(ch) | |
return ch |
package time_profile | |
import "testing" | |
func Benchmark_TimeAfter(b *testing.B) { | |
ch := timeAfter() | |
for n := 0; n < b.N; n++ { | |
ch <- struct{}{} | |
} |
package time_profile | |
import "time" | |
func newTimer() chan struct{} { | |
ch := make(chan struct{}) | |
go func(ch chan struct{}) { | |
waitduration := 5000 * time.Millisecond |
package time_profile | |
import "testing" | |
func Benchmark_NewTimer(b *testing.B) { | |
ch := newTimer() | |
for n := 0; n < b.N; n++ { | |
ch <- struct{}{} | |
} |
package main | |
import ( | |
"github.com/thehivecorporation/log" | |
"math/rand" | |
"time" | |
) | |
func main() { | |
ch := make(chan struct{}) |
package main | |
import ( | |
"encoding/json" | |
"github.com/thehivecorporation/log" | |
"net/http" | |
"time" | |
) | |
type res struct { |
package main | |
import ( | |
"context" | |
"encoding/json" | |
"github.com/juju/errors" | |
"github.com/thehivecorporation/log" | |
"net/http" | |
"time" | |
) |