Skip to content

Instantly share code, notes, and snippets.

View Epenjehem's full-sized avatar

Steve Anlorn Epenjehem

  • Indonesia
View GitHub Profile
package main
var total int
func Square(x int) int {
return x * x
}
func SquareOfSum(x, y int) int {
z := Square(x + y)
package main
type user struct {
name string
email string
}
func main() {
u1 := createUserV1()
u2 := createUserV2()
package statistic
import (
"fmt"
)
func ExampleMean() {
numbers := []int64{1, 2, 3, 4, 5}
mean := Mean(numbers)
fmt.Println(mean)
func BenchmarkPrintWeather(b *testing.B) {
b.RunParallel(func(pb *testing.PB) {
for pb.Next() {
PrintWeather(90001)
}
})
}
func BenchmarkSendFeedBack(b *testing.B) {
b.StopTimer()
ctx := context.Background()
feedback := Feedback{
ReasonCode: "1",
Source: "search",
UserId: "100",
Data: []FeedbackDetail{
package pkg
import (
"bytes"
"testing"
"text/template"
)
func BenchmarkExample(b *testing.B) {
temp, _ := template.New("").Parse("Hello, Go!")
package pack_test
import (
"testing"
"github.com/epenjehem/numbers"
)
import "testing"
func TestCanAddNumbers(t *testing.T) {
package main
import (
"fmt"
"math/rand"
"reflect"
"testing/quick"
"time"
)
package main
import (
"fmt"
"math/rand"
"reflect"
"testing/quick"
"time"
)
package main
import (
"fmt"
"math/rand"
"reflect"
"testing/quick"
"time"
)