-
Notifications
You must be signed in to change notification settings - Fork 0
/
day-1.log
590 lines (498 loc) · 20.2 KB
/
day-1.log
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
go version
go version go1.19.2 linux/amd64
unter on main via go v1.19.2
$ git --version
git version 2.38.0
unter on main via go v1.19.2
$ docker version
Client:
Version: 20.10.18
API version: 1.41
Go version: go1.19.1
Git commit: b40c2f6b5d
Built: Sat Sep 10 11:31:10 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Server:
Engine:
Version: 20.10.18
API version: 1.41 (minimum version 1.12)
Go version: go1.19.1
Git commit: e42327a6d3
Built: Sat Sep 10 11:30:17 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.6.8
GitCommit: 9cd3357b7fd7218e4aec3eae239db1f68a5a6ec6.m
runc:
Version: 1.1.4
GitCommit:
docker-init:
Version: 0.19.0
GitCommit: de40ad0
unter on main via go v1.19.2
$ go mod init curl
unter on main [!?] via go v1.19.2
$ curl http://localhost:8080/health
OK
unter on main [!?] via go v1.19.2
$ curl -i http://localhost:8080/health
HTTP/1.1 200 OK
Date: Mon, 24 Oct 2022 17:40:18 GMT
Content-Length: 3
Content-Type: text/plain; charset=utf-8
OK
unter on main [!?] via go v1.19.2
$ curl -i http://localhost:8080/rides
HTTP/1.1 200 OK
Date: Mon, 24 Oct 2022 17:54:02 GMT
Content-Length: 37
Content-Type: text/plain; charset=utf-8
87f6e24c-c0a2-413c-8673-59b2531b41f7
unter on main [!?] via go v1.19.2
❮ curl -i http://localhost:8080/rides
HTTP/1.1 200 OK
Date: Mon, 24 Oct 2022 17:54:03 GMT
Content-Length: 37
Content-Type: text/plain; charset=utf-8
428b612b-4876-466e-aabd-79bc89bf0e1e
unter on main [!?] via go v1.19.2
❮ curl -i http://localhost:8080/rides
HTTP/1.1 200 OK
Date: Mon, 24 Oct 2022 17:54:04 GMT
Content-Length: 37
Content-Type: text/plain; charset=utf-8
f8a0167f-6d3b-4fb6-acbe-6bf0bdc12736
unter on main [!?] via go v1.19.2
❮ curl -i http://localhost:8080/rides
HTTP/1.1 200 OK
Date: Mon, 24 Oct 2022 17:54:04 GMT
Content-Length: 37
Content-Type: text/plain; charset=utf-8
da8d015e-4eda-4fe9-88f9-e6e2ac8af8cb
unter on main [!?] via go v1.19.2
❮ curl -i http://localhost:8080/rides
HTTP/1.1 200 OK
Date: Mon, 24 Oct 2022 17:54:05 GMT
Content-Length: 37
Content-Type: text/plain; charset=utf-8
4d01f4dd-8246-4601-9dc2-3b97c6e216ad
unter on main [!?] via go v1.19.2
$ go env GOROOT
/home/miki/sdk/go1.19.2
unter on main [!?] via go v1.19.2
$go env GOPATH
/home/miki/go
unter on main [!?] via go v1.19.2
$ go env GOPATH
unter on main [!?] via go v1.19.2
$ ls ~/go/pkg
mod sumdb
unter on main [!?] via go v1.19.2
$ ls ~/go/pkg/mod
4d63.com contrib.go.opencensus.io golang.org [email protected] go.uber.org
9fans.net github.com google.golang.org [email protected] honnef.co
cache gitlab.com [email protected] gotest.tools mvdan.cc
cloud.google.com go.etcd.io gopkg.in [email protected]+incompatible
unter on main [!?] via go v1.19.2
$ go mod vendor
unter on main [!?] via go v1.19.2
$ ls
_class cmd go.mod go.sum README.md unter.go vendor
unter on main [!?] via go v1.19.2
$ ls vendor
github.com modules.txt
unter on main [!?] via go v1.19.2
$ rm -r vendor
unter on main [!?] via go v1.19.2
$go mod vendor
unter on main [!?] via go v1.19.2
$ ls
_class cmd go.mod go.sum README.md unter.go vendor
unter on main [!?] via go v1.19.2
$ cat vendor/modules.txt
# github.com/google/uuid v1.3.0
## explicit
github.com/google/uuid
unter on main [!?] via go v1.19.2
$ rm -r vendor
unter on main [!?] via go v1.19.2
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/miki/.cache/go-build"
GOENV="/home/miki/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/miki/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/miki/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/miki/sdk/go1.19.2"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/miki/sdk/go1.19.2/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19.2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/miki/teaching/practical-go-services/unter/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3218291271=/tmp/go-build -gno-record-gcc-switches"
unter on main [!?] via go v1.19.2
$ git add .
unter on main [+] via go v1.19.2
$ git ci -m 'health & start of /start'
[main a505e6f] health & start of /start
6 files changed, 90 insertions(+)
create mode 100644 _class/quotes.txt
create mode 100644 cmd/httpd/main.go
create mode 100644 go.sum
unter on main [⇡] via go v1.19.2
$ git push
Enumerating objects: 16, done.
Counting objects: 100% (16/16), done.
Delta compression using up to 12 threads
Compressing objects: 100% (9/9), done.
Writing objects: 100% (11/11), 1.76 KiB | 1.76 MiB/s, done.
Total 11 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To github.com:353solutions/srv-2210.git
b6057cd..a505e6f main -> main
unter on main via go v1.19.2 took 2s
$ curl -d'{"driver": "Bond", "kind": "private"}' http://localhost:8080/rides
bad request
unter on main [!?] via go v1.19.2
$ curl -d'{"driver": "Bond", "kind": "private"}' http://localhost:8080/rides
{"id":"215258ab-863b-4005-aaa7-68d04b35af0b"}%
unter on main [!?] via go v1.19.2
$curl -d'{"driver": "Bond", "kind": "private"}' http://localhost:8080/rides
404 page not found
unter on main [!?] via go v1.19.2
$ curl -d'{"driver": "Bond", "kind": "private"}' http://localhost:8080/rides
{"id":"098a354c-6e99-4b01-97af-01852145bdb3"}%
unter on main [!?] via go v1.19.2
$ curl http://localhost:8080/rides/098a354c-6e99-4b01-97af-01852145bdb3
{"ID":"098a354c-6e99-4b01-97af-01852145bdb3","Driver":"Bond","Kind":2,"Start":"2022-10-24T19:01:58.452977031Z","End":"0001-01-01T00:00:00Z","Distance":0}%
unter on main [!?] via go v1.19.2
$ git add .
unter on main [+] via go v1.19.2
$ git ci -m 'start & get'
[main 21b9ba9] start & get
6 files changed, 183 insertions(+), 6 deletions(-)
create mode 100755 cmd/httpd/__debug_bin
create mode 100644 cmd/httpd/db.go
unter on main [⇡] via go v1.19.2
$ git rm -f cmd/httpd/__debug_bin
rm 'cmd/httpd/__debug_bin'
unter on main [✘⇡] via go v1.19.2
$ git ci -m oops
[main 98ab35f] oops
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100755 cmd/httpd/__debug_bin
unter on main [⇡] via go v1.19.2
$git push
Enumerating objects: 21, done.
Counting objects: 100% (21/21), done.
Delta compression using up to 12 threads
Compressing objects: 100% (12/12), done.
Writing objects: 100% (14/14), 3.32 MiB | 542.00 KiB/s, done.
Total 14 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), done.
To github.com:353solutions/srv-2210.git
a505e6f..98ab35f main -> main
unter on main via go v1.19.2 took 10s
$ mv cmd/httpd/.gitignore .
unter on main [!?] via go v1.19.2
$ curl -d'{"driver": "Bond", "kind": "private"}' http://localhost:8080/rides
{"id":"f7287042-ad52-4265-bd49-98a089b20f15"}%
unter on main [!?] via go v1.19.2
$ curl http://localhost:8080/rides/f7287042-ad52-4265-bd49-98a089b20f15
{"id":"f7287042-ad52-4265-bd49-98a089b20f15","driver":"Bond","kind":"private","start":"2022-10-24T19:21:35.790545342Z"}%
unter on main [!?] via go v1.19.2
$ curl -d'{"driver": "Bond", "kind": "private"}' http://localhost:8080/rides
{"id":"78925724-5157-45ce-94d0-16081a867005"}%
unter on main [!?] via go v1.19.2
$ curl http://localhost:8080/rides/78925724-5157-45ce-94d0-16081a867005
{"id":"78925724-5157-45ce-94d0-16081a867005","driver":"Bond","kind":"private","start":"2022-10-24T19:22:35.259746177Z","end":null}%
unter on main [!?] via go v1.19.2
$ git add .
unter on main [+] via go v1.19.2
$ git st
## main...origin/main
A .gitignore
M README.md
M _class/day-1.log
M cmd/httpd/main.go
unter on main [!+] via go v1.19.2
$ git ci -m 'get with custom JSON'
[main 214a498] get with custom JSON
3 files changed, 27 insertions(+), 1 deletion(-)
create mode 100644 .gitignore
unter on main [!⇡] via go v1.19.2
$ git push
Enumerating objects: 12, done.
Counting objects: 100% (12/12), done.
Delta compression using up to 12 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (7/7), 1.06 KiB | 1.06 MiB/s, done.
Total 7 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To github.com:353solutions/srv-2210.git
98ab35f..214a498 main -> main
unter on main [!] via go v1.19.2 took 2s
$ git st -u
## main...origin/main
M _class/day-1.log
M cmd/httpd/main.go
unter on main [!] via go v1.19.2
$ git log
unter on main [!] via go v1.19.2
❮ curl -d'{"driver": "Bond", "kind": "private"}' http://localhost:8080/rides
{"action":"start","id":"4aabb155-0cd7-4f95-9bd4-c883cac1a4f7"}%
unter on main [!] via go v1.19.2
$ curl -d'{"distance": 1.2}' http://localhost:8080/rides/4aabb155-0cd7-4f95-9bd4-c883cac1a4f7/end
404 page not found
unter on main [!] via go v1.19.2
$ curl -d'{"driver": "Bond", "kind": "private"}' http://localhost:8080/rides
{"action":"start","id":"d6cfb01d-54c9-4416-b5e7-0455fff46344"}%
unter on main [!] via go v1.19.2
$ curl -d'{"distance": 1.2}' http://localhost:8080/rides/d6cfb01d-54c9-4416-b5e7-0455fff46344/end
{"action":"end","id":"d6cfb01d-54c9-4416-b5e7-0455fff46344"}%
unter on main [!] via go v1.19.2
❮ curl http://localhost:8080/rides/d6cfb01d-54c9-4416-b5e7-0455fff46344
{"id":"d6cfb01d-54c9-4416-b5e7-0455fff46344","driver":"Bond","kind":"private","start":"2022-10-24T19:50:09.006839378Z","end":"2022-10-24T19:50:22.720238521Z","distance":1.2}%
unter on main [!] via go v1.19.2
$ git add -u
unter on main [+] via go v1.19.2
$ git ci -m '/end'
[main 394ef8b] /end
2 files changed, 299 insertions(+), 1 deletion(-)
unter on main [⇡] via go v1.19.2
$ git push
Enumerating objects: 13, done.
Counting objects: 100% (13/13), done.
Delta compression using up to 12 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (7/7), 2.96 KiB | 2.96 MiB/s, done.
Total 7 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To github.com:353solutions/srv-2210.git
214a498..394ef8b main -> main
unter on main via go v1.19.2 took 2s
$ git alias ci
git: 'alias' is not a git command. See 'git --help'.
unter on main via go v1.19.2
$ git help status
unter on main via go v1.19.2
❮ git help st
'st' is aliased to 'status --untracked-files=no -sb'
unter on main via go v1.19.2
$ git help ci
'ci' is aliased to 'commit'
unter on main via go v1.19.2
$ curl -d'{"driver": "Bond", "kind": "private"}' http://localhost:8080/rides
{"action":"start","id":"fadfeb15-769e-4d23-9366-3379b4590639"}%
unter on main [!] via go v1.19.2
$curl -d'{"driver": "Bond", "kind": "private"}' http://localhost:8080/rides
{"action":"start","id":"19812d07-9299-4c8b-a54d-30ef349ead76"}%
unter on main [!] via go v1.19.2
❮
unter on main [!] via go v1.19.2
$ git add -a
error: unknown switch `a'
usage: git add [<options>] [--] <pathspec>...
-n, --dry-run dry run
-v, --verbose be verbose
-i, --interactive interactive picking
-p, --patch select hunks interactively
-e, --edit edit current diff and apply
-f, --force allow adding otherwise ignored files
-u, --update update tracked files
--renormalize renormalize EOL of tracked files (implies -u)
-N, --intent-to-add record only the fact that the path will be added later
-A, --all add changes from all tracked and untracked files
--ignore-removal ignore paths removed in the working tree (same as --no-all)
--refresh don't add, only refresh the index
--ignore-errors just skip files which cannot be added because of errors
--ignore-missing check if - even missing - files are ignored in dry run
--sparse allow updating entries outside of the sparse-checkout cone
--chmod (+|-)x override the executable bit of the listed files
--pathspec-from-file <file>
read pathspec from file
--pathspec-file-nul with --pathspec-from-file, pathspec elements are separated with NUL character
unter on main [!] via go v1.19.2
$ git st -u
## main...origin/main
M cmd/httpd/main.go
unter on main [!] via go v1.19.2
$ git add -u
unter on main [+] via go v1.19.2
$ git commit -m 'middleware'
[main 190a865] middleware
1 file changed, 42 insertions(+), 1 deletion(-)
unter on main [⇡] via go v1.19.2
$ git push
Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 12 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (5/5), 843 bytes | 843.00 KiB/s, done.
Total 5 (delta 2), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To github.com:353solutions/srv-2210.git
394ef8b..190a865 main -> main
unter on main via go v1.19.2 took 2s
$ go mod tidy
go: finding module for package github.com/ardanlabs/conf
go: found github.com/ardanlabs/conf in github.com/ardanlabs/conf v1.5.0
unter on main [!] via go v1.19.2
$go get github.com/ardanlabs/conf/v3
go: added github.com/ardanlabs/conf/v3 v3.1.2
unter on main [!] via go v1.19.2
$ go mod tidy
go: finding module for package github.com/ardanlabs/conf/v3
go: found github.com/ardanlabs/conf/v3 in github.com/ardanlabs/conf/v3 v3.1.2
unter on main [!] via go v1.19.2 took 10s
❮ k
unter on main [!] via go v1.19.2
$ go run ./cmd/httpd
2022/10/24 23:32:11 INFO: config=main.Config{Addr:":8080", DSN:"host=localhost user=postgres"}
2022/10/24 23:32:11 INFO: server starting on :8080
^Csignal: interrupt
unter on main [!] via go v1.19.2
$ UNTER_ADDR=:9999 go run ./cmd/httpd
2022/10/24 23:32:19 INFO: config=main.Config{Addr:":9999", DSN:"host=localhost user=postgres"}
2022/10/24 23:32:19 INFO: server starting on :8080
^Csignal: interrupt
unter on main [!] via go v1.19.2 took 13s
❮ UNTER_ADDR=:9999 go run ./cmd/httpd
2022/10/24 23:35:33 INFO: config=main.Config{Addr:":9999", DSN:"host=localhost user=postgres"}
2022/10/24 23:35:33 INFO: server starting on :8080
^Csignal: interrupt
unter on main [!] via go v1.19.2
❮ UNTER_ADDR=9999 go run ./cmd/httpd
2022/10/24 23:35:37 ERROR: can't load config - bad port: missing ':' in address
exit status 1
unter on main [!] via go v1.19.2
❮ UNTER_ADDR=:9999 go run ./cmd/httpd
2022/10/24 23:37:01 INFO: config=main.Config{Addr:":9999", DSN:"host=localhost user=postgres"}
2022/10/24 23:37:01 INFO: server starting on :9999
^Csignal: interrupt
unter on main [!] via go v1.19.2 took 9s
❮ UNTER_ADDR=:9999 go run ./cmd/httpd
2022/10/24 23:41:34 INFO: config=main.Config{Addr:":9999", DSN:"host=localhost user=postgres"}
2022/10/24 23:41:34 INFO: server starting on :9999
^Csignal: interrupt
unter on main [!] via go v1.19.2 took 2s
$ git add -u
unter on main [+] via go v1.19.2
$ git commit -m 'config & server struct'
[main 7b67ef2] config & server struct
6 files changed, 284 insertions(+), 20 deletions(-)
unter on main [⇡] via go v1.19.2
$ git push
Enumerating objects: 21, done.
Counting objects: 100% (21/21), done.
Delta compression using up to 12 threads
Compressing objects: 100% (10/10), done.
Writing objects: 100% (11/11), 6.03 KiB | 6.03 MiB/s, done.
Total 11 (delta 4), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (4/4), completed with 4 local objects.
To github.com:353solutions/srv-2210.git
190a865..7b67ef2 main -> main
unter on main via go v1.19.2 took 2s
$ go build ./cmd/httpd
unter on main [?] via go v1.19.2
$ ./httpd&
[1] 93567
2022/10/24 23:43:49 INFO: config=main.Config{Addr:":8080", DSN:"host=localhost user=postgres"}
2022/10/24 23:43:49 INFO: server starting on :8080
unter on main [?] via go v1.19.2
✦ $
unter on main [?] via go v1.19.2
✦ $ curl http://localhost:8080/health
2022/10/24 23:44:03 /health called (rid = d11d2cc2-0b64-4df7-94a9-3fba9a3cd7fc)
2022/10/24 23:44:03 /health ended in 7.022µs (rid = d11d2cc2-0b64-4df7-94a9-3fba9a3cd7fc)
OK
unter on main [?] via go v1.19.2
✦ $ kill %1
[1] + 93567 terminated ./httpd
unter on main [?] via go v1.19.2
$
unter on main [!?] via go v1.19.2
❮ ./httpd&
unter on main [!?] via go v1.19.2
$ rm httpd
unter on main [!] via go v1.19.2
$go run ./cmd/httpd
2022/10/24 23:45:58 INFO: config=main.Config{Addr:":8080", DSN:"host=localhost user=postgres"}
2022/10/24 23:45:58 INFO: server starting on :8080
^Csignal: interrupt
unter on main [!] via go v1.19.2
$ go build ./cmd/httpd
unter on main [!?] via go v1.19.2
$ ./httpd&
[1] 99651
2022/10/24 23:53:35 INFO: config=main.Config{Addr:":8080", DSN:"host=localhost user=postgres"}
2022/10/24 23:53:35 INFO: server starting on :8080
unter on main [!?] via go v1.19.2
✦ $ kill %1
2022/10/24 23:53:39 INFO: caught signal terminated, shutting down
2022/10/24 23:53:39 INFO: server down
[1] + 99651 done ./httpd
unter on main [!?] via go v1.19.2
$ rm httpd
unter on main [!] via go v1.19.2
$ go run ./cmd/httpd/
unter on main [!] via go v1.19.2
$ go build ./cmd/httpd
unter on main [!?] via go v1.19.2
$ ./httpd
2022/10/24 23:54:43 INFO: config=main.Config{Addr:":8080", DSN:"host=localhost user=postgres"}
2022/10/24 23:54:43 INFO: server starting on :8080^C2022/10/24 23:54:45 INFO: caught signal interrupt, shutting down
2022/10/24 23:54:45 INFO: server down
unter on main [!?] via go v1.19.2
$ ./httpd &
[1] 100274
2022/10/24 23:54:47 INFO: config=main.Config{Addr:":8080", DSN:"host=localhost user=postgres"}
2022/10/24 23:54:47 INFO: server starting on :8080
unter on main [!?] via go v1.19.2
✦ ❮ ./httpd
2022/10/24 23:54:49 INFO: config=main.Config{Addr:":8080", DSN:"host=localhost user=postgres"}
2022/10/24 23:54:49 INFO: server starting on :8080
2022/10/24 23:54:49 ERROR: listen tcp :8080: bind: address already in use
2022/10/24 23:54:49 INFO: server down
unter on main [!?] via go v1.19.2
✦ $ echo $?
1
unter on main [!?] via go v1.19.2
✦ $ kill %1`
∙
unter on main [!?] via go v1.19.2
✦ $ kill %1
2022/10/24 23:55:10 INFO: caught signal terminated, shutting down
2022/10/24 23:55:10 INFO: server down
[1] + 100274 done ./httpd
unter on main [!?] via go v1.19.2
$