Old but still worth to read about why one shouldn;t defer Close() on writable files:
https://www.joeshaw.org/dont-defer-close-on-writable-files/
https://www.joeshaw.org/dont-defer-close-on-writable-files/
www.joeshaw.org
Don't defer Close() on writable files
It'll bite you some day
Some pitfalls about generating Kubernetes Custom Resources with `controller-gen` over the years, and how to do more rigid validation and defaulting with it:
https://ahmet.im/blog/crd-generation-pitfalls/
https://ahmet.im/blog/crd-generation-pitfalls/
Ahmet Alp Balkan
Kubernetes CRD generation pitfalls
A quick code search query reveals at least 7,000 Kubernetes Custom Resource Definitions in the open source corpus,1 most of which are likely generated with controller-gen βa tool that turns Go structs with comments-based markers into Kubernetes CRD...
Providing context to cancellations in Go 1.20 with the new context WithCause API
https://josephwoodward.co.uk/2023/01/context-cancellation-cause-with-cancel-cause
and proposal https://github.com/golang/go/issues/51365
https://josephwoodward.co.uk/2023/01/context-cancellation-cause-with-cancel-cause
and proposal https://github.com/golang/go/issues/51365
Joseph Woodward's Blog
Providing context to cancellations in Go 1.20 with the new context WithCause API
TIL: strings.Split returns [""] if s does not contain sep and sep is not empty π
Split returns a slice of length 1 whose only element is s:
package main
import (
"fmt"
"strings"
)
func main() {
fmt.Printf("%q\n", strings.Split("", ","))
}
Split returns a slice of length 1 whose only element is s:
[""]
After releasing go1.24, we can manage tools as dependencies!
Here is very good step by step article about how to do it https://www.alexedwards.net/blog/how-to-manage-tool-dependencies-in-go-1.24-plus
Also it includes example how to add tools to seperate
Here is very good step by step article about how to do it https://www.alexedwards.net/blog/how-to-manage-tool-dependencies-in-go-1.24-plus
Also it includes example how to add tools to seperate
go.mod
file (TIL!)www.alexedwards.net
How to manage tool dependencies in Go 1.24+ - Alex Edwards
FYI: https://semgrep.dev/blog/2025/popular-github-action-tj-actionschanged-files-is-compromised/
https://www.stepsecurity.io/blog/harden-runner-detection-tj-actions-changed-files-action-is-compromised
https://www.stepsecurity.io/blog/harden-runner-detection-tj-actions-changed-files-action-is-compromised
Semgrep
Semgrep | π¨ Popular GitHub Action tj-actions/changed-files is compromised
Popular GitHub Action tj-actions/changed-files has been compromised with a payload that appears to attempt to dump secrets, impacting thousands of CI pipelines.
"Programming Is Like S*x: One mistake and you have to support it for the rest of your life." β Michael Sinz
πππ
πππ