Skip to content

Commit

Permalink
add log and reactor Dockerfile
Browse files Browse the repository at this point in the history
update hooks

update hooks
  • Loading branch information
iahob committed Jan 9, 2024
1 parent ac34b13 commit f2d5879
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module life
go 1.16

require (
github.com/jinzhu/copier v0.4.0
google.golang.org/grpc v1.55.0
google.golang.org/protobuf v1.30.0
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -688,6 +688,8 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/jinzhu/copier v0.4.0 h1:w3ciUoD19shMCRargcpm0cm91ytaBhDvuRpz1ODO/U8=
github.com/jinzhu/copier v0.4.0/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes=
Expand Down
2 changes: 1 addition & 1 deletion hooks/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN go install google.golang.org/grpc/cmd/[email protected]

#ENV PATH="$PATH:$(go env GOPATH)/bin"

WORKDIR /go/src/app
WORKDIR /app

# docker build --platform=linux/arm64 -t yuwenhaibo/proto-builder-arm:latest .
# docker build --platform=linux/amd64 -t yuwenhaibo/proto-builder-amd:latest .
Expand Down
5 changes: 2 additions & 3 deletions hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/bin/bash

#/bin/bash
echo "current dir"
pwd
echo "current dir: $(pwd)"


echo "dependency builder start"
Expand Down
2 changes: 2 additions & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package server
import (
"context"
"life/api/hello"
"log"
"time"
)

Expand All @@ -11,6 +12,7 @@ type ServerImpl struct {
}

func (s *ServerImpl) SayHello(ctx context.Context, req *hello.Request) (*hello.Response, error) {
log.Printf("req:%s", req.Greeting)
return &hello.Response{
Reply: req.Greeting,
UpdateAt: time.Now().Unix(),
Expand Down

0 comments on commit f2d5879

Please sign in to comment.