File tree Expand file tree Collapse file tree 3 files changed +33
-4
lines changed Expand file tree Collapse file tree 3 files changed +33
-4
lines changed Original file line number Diff line number Diff line change
1
+ FROM golang
Original file line number Diff line number Diff line change
1
+ // For format details, see https://aka.ms/devcontainer.json. For config options, see the
2
+ // README at: https://github.com/devcontainers/templates/tree/main/src/go
3
+ {
4
+ "name" : " Go" ,
5
+ // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6
+ "image" : " mcr.microsoft.com/devcontainers/go:1-1.23-bookworm" ,
7
+
8
+ // Features to add to the dev container. More info: https://containers.dev/features.
9
+ // "features": {},
10
+
11
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
12
+ // "forwardPorts": [],
13
+ "portsAttributes" : {
14
+ "8080" : {
15
+ "label" : " Open resume page" ,
16
+ "onAutoForward" : " notify"
17
+ }
18
+ },
19
+
20
+ // Use 'postCreateCommand' to run commands after the container is created.
21
+ "postCreateCommand" : " ./run.sh"
22
+
23
+ // Configure tool-specific properties.
24
+ // "customizations": {},
25
+
26
+ // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
27
+ // "remoteUser": "root"
28
+ }
Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ func main() {
24
24
func loggingMiddleware (next http.Handler ) http.Handler {
25
25
return http .HandlerFunc (func (w http.ResponseWriter , r * http.Request ) {
26
26
27
- // logrus.WithFields(logrus.Fields{
28
- // "requestURI": r.RequestURI,
29
- // "X-Forwarded-For": r.Header.Get("X-Forwarded-For"),
30
- // }).Info("incoming request")
27
+ logrus .WithFields (logrus.Fields {
28
+ "requestURI" : r .RequestURI ,
29
+ "X-Forwarded-For" : r .Header .Get ("X-Forwarded-For" ),
30
+ }).Info ("incoming request" )
31
31
32
32
next .ServeHTTP (w , r )
33
33
})
You can’t perform that action at this time.
0 commit comments