3.9 KiB
3.9 KiB
title, date, draft, references
| title | date | draft | references | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Golang | 2023-05-08T09:54:48-04:00 | false |
|
I find Go really compelling, even though it's not super applicable to my job. When evaluating a new tool, I find I'm weirdly biased to things written in Go.
- I like that it compiles, and have no desire to install someone else's Python
- It just seems to hit the right balance of productivity, performance, simplicity, safety
- The language (and the tech built with the language) just seems built to last
Questions to Answer
- How to organize large(r) codebases
- Goroutines / concurrency
- Dev tooling
- How to read/write JSON
- How to validate with JSON Schema
- Testing
Projects I like
Project Ideas
- Bookmarking app (Pinboard replacement)
- Note-taking / journaling app
- StevieBlocks
{{<thumbnail project1 "400x" />}}
Resources
- Standard Go Project Layout
- The files & folders of Go projects
- Why David Yach Loves Go
- One process programming notes (with Go and SQLite)
- Go Project Layout
- Gopher Wrangling. Effective error handling in Go
- Effective Go
Notes
- Regular Expressions
- Compile with
regexp.MustCompile(no need to check for error) - Strings denoted by backticks don't escape; use these for regular expressions
- For case-insensitive matching, start the expression with
(?i)
- Compile with
- Unnamed parameters
Unnamed parameters are perfectly valid. The Parameter declaration from the spec:
ParameterDecl = [ IdentifierList ] [ "..." ] Type .As you can see, the
IdentifierList(the identifier name or names) is in square brackets, which means it's optional. Only theTypeis required.The reason for this is because the names are not really important for someone calling a method or a function. What matters is the types of the parameters and their order. This is detailed in this answer: Getting method parameter names in Golang