rwdb, err := sqlitebp.OpenReadWriteCreate("app.db")
if err != nil {
log.Fatal(err)
}
rwdb.SetMaxOpenConns(1)
rwdb.SetMaxIdleConns(1)
// Read-only with default adaptive pool size (2-8 based on GOMAXPROCS)
rodb, err := sqlitebp.OpenReadOnly("app.db")
if err != nil {
log.Fatal(err)
} bash script.sh
Works on any system with bash in the path, doesn't require that it be executable, and is usually the ideal way to execute them. #!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
It reminds me when I wrote a lot of Perl: #!/usr/bin/perl
use strict;
use warnings;
I also prefer --long --args everywhere possible and a comment on any short flag unless it's incredibly common.
Chrony is also much better software than any of the PTP daemons I tested a few years ago (for an onboard autonomous vehicle system).