Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
"default:automergeDigest"
"config:recommended",
"default:automergeDigest",
"helpers:pinGitHubActionDigestsToSemver"
],
"minimumReleaseAge": "7 days",
"internalChecksFilter": "strict",
"packageRules": [
{
"matchDatasources": ["go", "github-releases", "github-tags"],
"description": "Automerge non-major Go module updates when checks pass",
"matchManagers": ["gomod"],
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
"automerge": true
},
{
"description": "Automerge GitHub Actions updates, including majors, when checks pass",
"matchManagers": ["github-actions"],
"automerge": true
}
]
}

33 changes: 18 additions & 15 deletions .github/workflows/codetests.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
name: test-and-lint
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
jobs:
codespell:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: codespell-project/actions-codespell@e3258cca84ce02b0bb36a3d41f2c18f719a0cc1a # v2.4.3
with:
skip: .git,go.sum
# Runs `go test` against 3 operating systems.
gotest:
strategy:
matrix:
os: [macos, windows, ubuntu]
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: stable
- name: go-test
run: go test -race -covermode=atomic -coverprofile=coverage ./... && go tool cover -func=coverage

run: go test -race -covermode=atomic '-test.v' ./...
# Runs golangci-lint on macos against freebsd and macos.
golangci-darwin:
strategy:
Expand All @@ -33,14 +36,14 @@ jobs:
env:
GOOS: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v6
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: stable
- uses: actions/checkout@v6
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
with:
version: v2.11.4
version: v2.13
# Runs golangci-lint on linux against linux and windows.
golangci-linux:
strategy:
Expand All @@ -51,11 +54,11 @@ jobs:
env:
GOOS: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v6
- uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version: stable
- uses: actions/checkout@v6
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
with:
version: v2.11.4
version: v2.13
19 changes: 6 additions & 13 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
version: '2'
version: "2"
linters:
default: all
disable:
- exhaustruct
- depguard
- wsl
- testpackage
- wsl # deprecated.
- exhaustruct # deprecated.
- exhaustruct_v5 # Config and the stream types leave sync and buffer fields at zero.
- gomodguard # deprecated.
- depguard # flags testify.
settings:
gocritic:
enable-all: true
Expand All @@ -14,14 +15,6 @@ linters:
settings:
unnamedResult:
checkExported: true
errcheck:
check-type-assertions: true
check-blank: false
disable-default-exclusions: false
exclude-functions:
- (*os.File).Close
- (io.Closer).Close

issues:
max-issues-per-linter: 0
max-same-issues: 0
Expand Down
4 changes: 2 additions & 2 deletions encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func (e *Encoder) SetSize(size string) int64 {
return e.config.Size
}

// GetVideo retreives video from an input and returns an io.ReadCloser to consume the output.
// GetVideo retrieves video from an input and returns an io.ReadCloser to consume the output.
// Input must be an RTSP URL. Title is encoded into the video as the "movie title."
// Returns command used for diagnostics, io.ReadCloser and error or nil.
// This will automatically create a context timeout based on the requested capture length.
Expand Down Expand Up @@ -221,7 +221,7 @@ func (e *Encoder) GetVideo(input, title string) (string, io.ReadCloser, error) {
return cmdStr, &cancelReadCloser{ReadCloser: stream, cancel: cancel}, nil
}

// GetVideoContext retreives video from an input and returns an io.ReadCloser to consume the output.
// GetVideoContext retrieves video from an input and returns an io.ReadCloser to consume the output.
// Input must be an RTSP URL. Title is encoded into the video as the "movie title."
// Returns command used for diagnostics, io.ReadCloser and error or nil.
// Use the context to add a timeout value (max run duration) to the ffmpeg command.
Expand Down
Loading
Loading