|
You are here |
cep.dev | ||
| | | | |
pliutau.com
|
|
| | | | | Software Engineering Lead with a passion for APIs, Web, Cloud, Microservices, DevOps, Kubernetes etc. Engineering Lead at solsten.io | |
| | | | |
hjr265.me
|
|
| | | | | Working with user-generated content is always a nightmare interesting. Let's say you are building a blogging platform with Go. Your users write posts in Markdown that the platform then renders as HTML. And, you want to add target="_blank" and rel="noreferrer noopener" to all the external links. How do you do that? Annotated Code The steps are simple: Parse the HTML with golang.org/x/net/html. Walk the tree. The annotated code below implements a simple Walk function. | |
| | | | |
mfbmina.dev
|
|
| | | | | One of the best Go features is how easy we can use concurrency. The language gives us goroutines, which are like lightweight threads managed by the Go runtime. It help us to run several functions at the same instant and is very helpful if you wish to improve the performance of your application. Using this feature is easy as adding the go keyword before any function call. This will make the function run concurrently. To make it simpler, let's show you the code. Here I've written the SleepSort algorithm, w... | |
| | | | |
www.4async.com
|
|
| | | ???Go?1.17???????????????????????1.17????????????????????????1.18????????????????6?????????????????????Go 1.18??????????1.17??????????????? ???????? ???Go????????????????????????????????????interface{}????????????????????????????????????????????????????????????????????Go??????????????????????????????????????????????????????interface{}????????????????????????????????????????????????????????????????????????????????????????????? ?Go????????????????????????????????????????????????????????????????????????????... | ||