Sharing about Go related
Articles in this series
Background Few months earlier, when i started to design on my final year project for bachelor degree, I needed a programming language that can handle concurrency well, and at the same time, with modern syntax. I looked into multiple programming langu...
Introduction I have been writing app service/REST/RPC in Go on and off quite awhile, for freelancing and side projects. I have use numbers of frameworks/libraries like Echo, Gorilla toolkit and so on. Unfortunately, I did not use Go at work. Go is no...
Recently Go has released an experimentation tool for generics. Here is my quick attempts. Contains function Playground link package main import "fmt" func Contains(type T comparable)(col []T, item T) bool { for _, e := range col { if e...
This is continue of previous blog After some discussion, the playground is updated with generic with [type T] syntax Using the example previous blog, here is the rewrite version Contains function Playground link package main import ( "fmt" ) fu...
This is continue of previous blog The syntax now is settled with [T any] syntax, without type keyword, where any indicates that there are no constraints. Using the example previous blog, here is the rewrite version without type Contains function Play...