Skip to content

Commit e95d8a1

Browse files
authored
Make ReadChannel Buffered (#1)
Rename Repository
1 parent 64ad2bb commit e95d8a1

File tree

13 files changed

+179
-53
lines changed

13 files changed

+179
-53
lines changed

.devcontainer/Dockerfile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
FROM debian:latest AS base
2+
3+
ARG GO_VERSION="<VERSION>"
4+
ENV GO_VERSION=${GO_VERSION}
5+
6+
RUN apt-get update \
7+
&& apt-get upgrade -y
8+
RUN apt-get install -y ca-certificates openssl wget git git-lfs tar gnupg2 gcc
9+
10+
RUN wget https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz \
11+
&& tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz
12+
13+
ENV PATH /usr/local/go/bin:$PATH
14+
15+
ENV GOPATH /go
16+
ENV PATH $GOPATH/bin:$PATH
17+
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 1777 "$GOPATH"
18+
WORKDIR $GOPATH
19+
RUN go install -v golang.org/x/tools/gopls@latest \
20+
&& go install github.com/go-delve/delve/cmd/dlv@latest \
21+
&& go install honnef.co/go/tools/cmd/staticcheck@latest \
22+
&& go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@latest \
23+
&& go install gotest.tools/gotestsum@latest
24+
25+
FROM base AS dev
26+
27+
RUN go install github.com/pact-foundation/pact-go/[email protected] \
28+
&& go install github.com/CycloneDX/cyclonedx-gomod/cmd/cyclonedx-gomod@latest \
29+
&& go install github.com/google/go-licenses@latest \
30+
&& go install golang.org/x/vuln/cmd/govulncheck@latest

.devcontainer/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Developing inside DevContainer
2+
3+
Build Container for using with DevContainer development
4+
```
5+
docker buildx build -t devcontainer-go-dev:latest --build-arg GO_VERSION="1.23.6" --target dev .
6+
```
7+

.devcontainer/devcontainer.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "GoCan",
3+
"image": "devcontainer-go-dev:latest",
4+
"runArgs": [
5+
"--name=GoCan_Devcontainer"
6+
],
7+
"customizations": {
8+
// Configure properties specific to VS Code.
9+
"vscode": {
10+
// Add the IDs of extensions you want installed when the container is created.
11+
"extensions": ["golang.Go"],
12+
"settings": {
13+
"extensions.verifySignature": false
14+
}
15+
}
16+
}
17+
}

.github/workflows/ci.yml

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: go - ci
2+
3+
on:
4+
pull_request:
5+
branches: [ "main" ]
6+
push:
7+
branches: [ "main" ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
build-test:
12+
runs-on: [ ubuntu-latest ]
13+
outputs:
14+
go-version: ${{ steps.setup-go.outputs.go-version }}
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Go
20+
id: setup-go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version-file: go.mod
24+
25+
- name: Setup gotestsum
26+
run: go install gotest.tools/gotestsum@latest
27+
28+
- name: Test
29+
run: gotestsum --format testname --junitfile report.xml -- -tags=skip ./...
30+
31+
- name: Publish test results
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: test-results
35+
path: report.xml
36+
37+
- name: Annotate test results
38+
if: ${{ ! cancelled() }}
39+
uses: dorny/test-reporter@v1
40+
with:
41+
name: go tests
42+
path: report.xml
43+
reporter: java-junit
44+
45+
check:
46+
runs-on: [ ubuntu-latest ]
47+
steps:
48+
49+
- name: Checkout
50+
uses: actions/checkout@v4
51+
52+
- name: Set up Go
53+
uses: actions/setup-go@v5
54+
with:
55+
go-version-file: go.mod
56+
57+
- name: Static-Check
58+
run: |
59+
go install honnef.co/go/tools/cmd/staticcheck@latest
60+
staticcheck ./...
61+
62+
- name: Dependency-Update-Check
63+
if: github.ref != 'refs/heads/main'
64+
run: |
65+
go get -u ./...
66+
go mod tidy
67+
if git diff --quiet -- go.mod go.sum
68+
then
69+
echo Project dependencies are up to date.
70+
else
71+
echo Project dependencies are outdatet.
72+
echo Run \'go get -u ./... && go mod tidy\' to update project dependecies.
73+
exit 1
74+
fi
75+
76+
- name: Misspell-Check
77+
run: |
78+
go install github.com/client9/misspell/cmd/misspell@latest
79+
find . -type f -name '*.go' | xargs misspell -error
80+
81+
- name: Vulnerability-Check
82+
if: github.ref != 'refs/heads/main'
83+
run: |
84+
go install golang.org/x/vuln/cmd/govulncheck@latest
85+
govulncheck ./...
86+

LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Portions Copyright (c) 2019-2022 https://github.com/angelodlfrtr
4+
Portions Copyright (c) [2025] [Tobias Jaster]
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

Makefile

Lines changed: 0 additions & 17 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# go-can
22

3-
[github.com/angelodlfrtr/go-can](https://github.com/angelodlfrtr/go-can) is a canbus golang library supporting multiple transports (serial adapater, socketcan, etc).
3+
[github.com/jaster-prj/go-can](https://github.com/jaster-prj/go-can) is a canbus golang library supporting multiple transports (serial adapater, socketcan, etc).
44

55
**Does not support extended frames, feel free to create a PR**
66

77
## Installation
88

99
```bash
10-
go get github.com/angelodlfrtr/go-can
10+
go get github.com/jaster-prj/go-can
1111
```
1212

1313
## Basic usage
@@ -19,8 +19,8 @@ import (
1919
"log"
2020
"time"
2121

22-
"github.com/angelodlfrtr/go-can"
23-
"github.com/angelodlfrtr/go-can/transports"
22+
"github.com/jaster-prj/go-can"
23+
"github.com/jaster-prj/go-can/transports"
2424
)
2525

2626
const TestPort string = "/dev/tty.usbserial-14140"
@@ -75,25 +75,3 @@ func main() {
7575
log.Println("done")
7676
}
7777
```
78-
79-
## License
80-
81-
Copyright (c) 2019 The contributors
82-
83-
Permission is hereby granted, free of charge, to any person obtaining a copy
84-
of this software and associated documentation files (the "Software"), to deal
85-
in the Software without restriction, including without limitation the rights
86-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
87-
copies of the Software, and to permit persons to whom the Software is
88-
furnished to do so, subject to the following conditions:
89-
90-
The above copyright notice and this permission notice shall be included in all
91-
copies or substantial portions of the Software.
92-
93-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
94-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
95-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
96-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
97-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
98-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
99-
SOFTWARE.

examples/usbcananalyzer/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"log"
55
"time"
66

7-
"github.com/angelodlfrtr/go-can"
8-
"github.com/angelodlfrtr/go-can/transports"
7+
"github.com/jaster-prj/go-can"
8+
"github.com/jaster-prj/go-can/transports"
99
)
1010

1111
// TestPort contain serial path to test port

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
module github.com/angelodlfrtr/go-can
1+
module github.com/jaster-prj/go-can
22

3-
go 1.19
3+
go 1.23.4
44

55
require (
66
github.com/angelodlfrtr/serial v0.0.0-20190912094943-d028474db63c
77
github.com/brutella/can v0.0.2
88
)
99

10-
require golang.org/x/sys v0.3.0 // indirect
10+
require golang.org/x/sys v0.30.0 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ github.com/angelodlfrtr/serial v0.0.0-20190912094943-d028474db63c/go.mod h1:kGJN
33
github.com/brutella/can v0.0.2 h1:8TyjZrBZSwQwSr5x3U9KtKzGW8HNE/NpUgsNcYDAVIM=
44
github.com/brutella/can v0.0.2/go.mod h1:NYDxbQito3w4+4DcjWs/fpQ3xyaFdpXw/KYqtZFU98k=
55
golang.org/x/sys v0.0.0-20181213200352-4d1cda033e06/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
6-
golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
7-
golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
6+
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
7+
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=

0 commit comments

Comments
 (0)