good morning!!!!
Skip to content
GitLab
Explore
Sign in
Commits on Source (10)
update
· 771ca197
a
authored
Aug 29, 2023
771ca197
ok
· a0ab0ae1
a
authored
Aug 29, 2023
a0ab0ae1
Update .gitlab-ci.yml
· b30d09a2
a
authored
Aug 31, 2023
b30d09a2
Update .gitlab-ci.yml
· eac3ccab
a
authored
Sep 01, 2023
eac3ccab
Add cogverage
· 2ec9737a
a
authored
Sep 01, 2023
2ec9737a
Merge branch 'master' of gfx.cafe:open/jrpc
· 26f30b0b
a
authored
Sep 01, 2023
26f30b0b
gitignore
· a72609fa
a
authored
Sep 01, 2023
a72609fa
sed
· 5771917b
a
authored
Sep 01, 2023
5771917b
fix
· cc281dcd
a
authored
Sep 05, 2023
cc281dcd
ok
· 47aaaabf
a
authored
Sep 05, 2023
47aaaabf
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
47aaaabf
...
...
@@ -4,3 +4,6 @@
*.tmp
*.log
*.test
coverage.txt
report.xml
.gitlab-ci.yml
View file @
47aaaabf
...
...
@@ -10,12 +10,12 @@
stages
:
-
test
lin
t
:
image
:
registry.gitlab.com/gitlab-org/gitlab-build-images:golangci-lint
-alpine
tes
t
:
image
:
golang:1.21
-alpine
stage
:
test
extends
:
.go-cache
script
:
-
go test -race ./...
-
CGO_ENABLED=1
go test -race ./...
lint
:
image
:
registry.gitlab.com/gitlab-org/gitlab-build-images:golangci-lint-alpine
...
...
@@ -37,11 +37,12 @@ lint:
coverage
:
stage
:
test
image
:
golang:1.2
0
-alpine
image
:
golang:1.2
1
-alpine
coverage
:
'
/\(statements\)(?:\s+)?(\d+(?:\.\d+)?%)/'
extends
:
.go-cache
script
:
-
go run gotest.tools/gotestsum@latest --junitfile report.xml --format testname -- -coverprofile=coverage.txt -covermode count ./...
-
sed -i '/jrpctest/d' coverage.txt
-
go tool cover -func=coverage.txt
-
go run github.com/boumenot/gocover-cobertura@master < coverage.txt > coverage.xml
artifacts
:
...
...
contrib/codecs/rdwr/codec.go
View file @
47aaaabf
...
...
@@ -90,8 +90,17 @@ func (c *Codec) Write(p []byte) (n int, err error) {
func
(
c
*
Codec
)
Flush
()
(
err
error
)
{
c
.
wrLock
.
Lock
()
defer
c
.
wrLock
.
Unlock
()
c
.
wr
.
WriteByte
(
'\n'
)
return
c
.
wr
.
Flush
()
if
c
.
wr
.
Buffered
()
>
0
{
err
=
c
.
wr
.
WriteByte
(
'\n'
)
if
err
!=
nil
{
return
err
}
err
=
c
.
wr
.
Flush
()
if
err
!=
nil
{
return
err
}
}
return
nil
}
// Closed returns a channel which is closed when the connection is closed.
...
...