Skip to content

Commit

Permalink
chore: americanize.
Browse files Browse the repository at this point in the history
  • Loading branch information
thorwebdev authored and soedirgo committed Nov 15, 2023
1 parent 5f9d5be commit 1348ffa
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
node_modules
package-lock.json

# Initialised by cli for local testing
# Initialized by cli for local testing
/supabase
2 changes: 1 addition & 1 deletion internal/db/branch/list/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func TestListCommand(t *testing.T) {
}, lines)
})

t.Run("lists uninitialised branch", func(t *testing.T) {
t.Run("lists uninitialized branch", func(t *testing.T) {
require.NoError(t, Run(afero.NewMemMapFs(), io.Discard))
})

Expand Down
2 changes: 1 addition & 1 deletion internal/db/dump/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var (
)

func Run(ctx context.Context, path string, config pgconn.Config, schema []string, dataOnly, roleOnly, keepComments, useCopy, dryRun bool, fsys afero.Fs) error {
// Initialise output stream
// Initialize output stream
var outStream afero.File
if len(path) > 0 {
f, err := fsys.OpenFile(path, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
Expand Down
2 changes: 1 addition & 1 deletion internal/db/reset/reset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ func TestResetCommand(t *testing.T) {
}

func TestInitDatabase(t *testing.T) {
t.Run("initialises postgres database", func(t *testing.T) {
t.Run("initializes postgres database", func(t *testing.T) {
utils.Config.Db.Port = 54322
utils.InitialSchemaSql = "CREATE SCHEMA public"
// Setup mock postgres
Expand Down
2 changes: 1 addition & 1 deletion internal/db/start/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func StartDatabase(ctx context.Context, fsys afero.Fs, w io.Writer, options ...f
if !WaitForHealthyService(ctx, utils.DbId, HealthTimeout) {
return ErrDatabase
}
// Initialise if we are on PG14 and there's no existing db volume
// Initialize if we are on PG14 and there's no existing db volume
if noBackupVolume {
if err := setupDatabase(ctx, fsys, w, options...); err != nil {
return err
Expand Down
4 changes: 2 additions & 2 deletions internal/db/start/start_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestStartDatabase(t *testing.T) {
utils.Volumes = []string{}
}

t.Run("initialise main branch", func(t *testing.T) {
t.Run("initialize main branch", func(t *testing.T) {
defer teardown()
utils.Config.Db.MajorVersion = 15
utils.Config.Db.Image = utils.Pg15Image
Expand Down Expand Up @@ -258,7 +258,7 @@ func TestStartCommand(t *testing.T) {
func TestSetupDatabase(t *testing.T) {
utils.Config.Db.MajorVersion = 15

t.Run("initialises database 14", func(t *testing.T) {
t.Run("initializes database 14", func(t *testing.T) {
utils.Config.Db.MajorVersion = 14
defer func() {
utils.Config.Db.MajorVersion = 15
Expand Down
2 changes: 1 addition & 1 deletion internal/start/templates/vector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ sinks:
method: "post"
request:
retry_max_duration_secs: 10
# We must route the sink through kong because ingesting logs before logflare is fully initialised will
# We must route the sink through kong because ingesting logs before logflare is fully initialized will
# lead to broken queries from studio. This works by the assumption that containers are started in the
# following order: vector > db > logflare > kong
uri: "http://{{ .KongId }}:8000/analytics/v1/api/logs?source_name=postgres.logs&api_key={{ .ApiKey }}"
Expand Down
2 changes: 1 addition & 1 deletion internal/utils/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ var Config = config{
// Use `mapstructure:"anon_key"` tag only if you want inject values from a predictable environment
// variable, such as SUPABASE_AUTH_ANON_KEY.
//
// Default values for internal configs should be added to `var Config` initialiser.
// Default values for internal configs should be added to `var Config` initializer.
type (
config struct {
ProjectId string `toml:"project_id"`
Expand Down
2 changes: 1 addition & 1 deletion internal/utils/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
var Docker = NewDocker()

func NewDocker() *client.Client {
// TODO: refactor to initialise lazily
// TODO: refactor to initialize lazily
cli, err := command.NewDockerCli()
if err != nil {
log.Fatalln("Failed to create Docker client:", err)
Expand Down
2 changes: 1 addition & 1 deletion internal/utils/templates/init_config.test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ max_rows = 1000
[db]
# Port to use for the local database URL.
port = 54322
# Port used by db diff command to initialise the shadow database.
# Port used by db diff command to initialize the shadow database.
shadow_port = 54320
# The database major version to use. This has to be the same as your remote database's. Run `SHOW
# server_version;` on the remote database to check.
Expand Down
2 changes: 1 addition & 1 deletion internal/utils/templates/init_config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ max_rows = 1000
[db]
# Port to use for the local database URL.
port = 54322
# Port used by db diff command to initialise the shadow database.
# Port used by db diff command to initialize the shadow database.
shadow_port = 54320
# The database major version to use. This has to be the same as your remote database's. Run `SHOW
# server_version;` on the remote database to check.
Expand Down

0 comments on commit 1348ffa

Please sign in to comment.