File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 11name : Go
22
33on :
4+ pull_request :
5+ paths :
6+ - ' **/*.go'
7+ - ' **/go.mod'
8+ - ' **/go.sum'
9+ - ' .github/workflows/go.yml'
10+
411 push :
512 paths :
613 - ' **/*.go'
714 - ' **/go.mod'
815 - ' **/go.sum'
916 - ' .github/workflows/go.yml'
1017
18+
19+ # The if of each job prevents running the workflow if it's from a pull request from the directory the pull request is targeted towards
20+ # as it will already run on 'push'
1121jobs :
1222 build :
23+ if : ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}
1324 runs-on : ubuntu-latest
1425 steps :
1526 - uses : actions/setup-go@v5
2031 run : go build -v ./...
2132
2233 test :
34+ if : ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}
2335 runs-on : ubuntu-latest
2436 steps :
2537 - uses : actions/setup-go@v5
3042 run : go test -v ./...
3143
3244 golangci :
45+ if : ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) }}
3346 runs-on : ubuntu-latest
3447 steps :
3548 - uses : actions/setup-go@v5
Original file line number Diff line number Diff line change @@ -135,10 +135,9 @@ func (r *pipeBuffer) Read(p []byte) (int, error) {
135135}
136136
137137// Write appends the contents of p to the buffer, growing the buffer as
138- // needed. The return value n is the length of p; err is always nil. If the
139- // buffer becomes too large, Write will panic with [ErrTooLarge].
140- func (r * pipeBuffer ) Write (p []byte ) (int , error ) {
141- return r .buffer .Write (p )
138+ // needed. If the buffer becomes too large, Write will panic with [ErrTooLarge].
139+ func (r * pipeBuffer ) Write (p []byte ) {
140+ _ , _ = r .buffer .Write (p )
142141}
143142
144143// Reset resets the buffer to be empty, but it retains the underlying
You can’t perform that action at this time.
0 commit comments