Skip to content

Commit a3b80e3

Browse files
author
ferguss
committed
Update docs
1 parent 234c605 commit a3b80e3

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,17 @@ This library aims to require as little configuration as possible, favouring over
4242
| Password | postgres |
4343
| Database | postgres |
4444
| Version | 15.3.0 |
45+
| Encoding | UTF8 |
46+
| Locale | C |
47+
| Version | 15.3.0 |
4548
| CachePath | $USER_HOME/.embedded-postgres-go/ |
4649
| RuntimePath | $USER_HOME/.embedded-postgres-go/extracted |
4750
| DataPath | $USER_HOME/.embedded-postgres-go/extracted/data |
4851
| BinariesPath | $USER_HOME/.embedded-postgres-go/extracted |
4952
| BinaryRepositoryURL | https://repo1.maven.org/maven2 |
5053
| Port | 5432 |
5154
| StartTimeout | 15 Seconds |
55+
| StartParameters | map[string]string{"max_connections": "101"} |
5256

5357
The *RuntimePath* directory is erased and recreated at each `Start()` and therefore not suitable for persistent data.
5458

@@ -85,10 +89,10 @@ Password("wine").
8589
Database("gin").
8690
Version(V12).
8791
RuntimePath("/tmp").
88-
BinaryRepositoryURL("https://repo.local/central.proxy").
92+
BinaryRepositoryURL("https://repo.local/central.proxy").
8993
Port(9876).
9094
StartTimeout(45 * time.Second).
91-
StartParameters(map[string]string{"max_connections": "200"}).
95+
StartParameters(map[string]string{"max_connections": "200"}).
9296
Logger(logger))
9397
err := postgres.Start()
9498

config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type Config struct {
2828

2929
// DefaultConfig provides a default set of configuration to be used "as is" or modified using the provided builders.
3030
// The following can be assumed as defaults:
31-
// Version: 15
31+
// Version: 16
3232
// Port: 5432
3333
// Database: postgres
3434
// Username: postgres

embedded_postgres_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,10 +448,7 @@ func Test_ConcurrentStart(t *testing.T) {
448448
}
449449

450450
func Test_CustomStartParameters(t *testing.T) {
451-
database := NewDatabase(DefaultConfig().StartParameters(map[string]string{
452-
"max_connections": "101",
453-
"shared_buffers": "16 MB", // Ensure a parameter with spaces encodes correctly.
454-
}))
451+
database := NewDatabase(DefaultConfig().StartParameters(map[string]string{"max_connections": "101"}))
455452
if err := database.Start(); err != nil {
456453
shutdownDBAndFail(t, err, database)
457454
}

0 commit comments

Comments
 (0)