All of the following information is based on go version go1.17.1 darwin/amd64
.
GOOS | Out of the Box |
---|---|
aix |
✅ |
android |
✅ |
// CPU friendly | |
for { | |
select { | |
case <-time.After(time.Second): | |
// do something | |
} | |
} | |
// instead of busy loop | |
for { |
I’m currently working (I’m just at the beginning, and I’m quite slow) on a personal project that will use Keepass files (kdb and kdbx).
I tried to find some documentation about .kdb and .kdbx format, but I didn’t find anything, even in the Keepass official website. I you want to know how these file formats are structured, you must read Keepass’s source code. So I wrote this article that explains how Keepass file format are structured, maybe it will help someone.
https://alexcabal.com/creating-the-perfect-gpg-keypair/
Create a regular GPG keypair. By default GPG creates one signing subkey (your identity) and one encryption subkey (how you receive messages intended for you).
Use GPG to add an additional signing subkey to your keypair. This new subkey is linked to the first signing key. Now we have three subkeys.
This keypair is your master keypair. Store it in a protected place like your house or a safe-deposit box. Your master keypair is the one whose loss would be truly catastrophic.
EXE = shell | |
SRC = . | |
LDFLAGS = -ldflags="-s -w" | |
windows: | |
GOOS=windows go build -o $(EXE)_win.exe $(LDFLAGS) $(SRC) | |
macos: | |
GOOS=darwin go build -o $(EXE)_macos $(LDFLAGS) $(SRC) |
package main | |
// The string values of the 2 classes | |
// They can be "positive" >< "negative" as in this example | |
// They can also be "ham" >< "spam", i.e. | |
const ( | |
positive = "positive" | |
negative = "negative" | |
) |