diff options
| author | Shulhan <ms@kilabit.info> | 2024-02-21 01:36:39 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2024-02-21 01:36:39 +0700 |
| commit | f8b6b66d9b407f7441a9170b46e42d928532f732 (patch) | |
| tree | 4d385e39a04ecbc6280201856acaae1c8cbb9436 /example.go | |
| parent | 9ca138628023b926ddf07cbd2e93562b8e782cf6 (diff) | |
| download | gorankusu-f8b6b66d9b407f7441a9170b46e42d928532f732.tar.xz | |
all: add parameter to use custom listen address in NewExample
This will allow running Example server with "make dev" and the test with
"make" or "make test" at the same time.
Diffstat (limited to 'example.go')
| -rw-r--r-- | example.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -60,10 +60,11 @@ type Example struct { } // NewExample create, initialize, and setup an example of Gorankusu. -func NewExample() (ex *Example, err error) { +func NewExample(listenAddress string) (ex *Example, err error) { var logp = `NewExample` var env = &Environment{ + ListenAddress: listenAddress, ResultsDir: `testdata/example/`, ResultsSuffix: `example`, } |
