-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 9a76908
Showing
12 changed files
with
353 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
platform: [macos-latest, ubuntu-latest, windows-latest] | ||
go-version: ["1.21"] | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- name: Setup Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download Go dependencies | ||
run: go mod download | ||
env: | ||
GOPROXY: "https://proxy.golang.org" | ||
|
||
- name: Build | ||
run: go build -v ./... | ||
|
||
- name: Test | ||
run: go test -v ./... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: golangci-lint | ||
on: | ||
push: | ||
tags: | ||
- v* | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21 | ||
cache: false | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.54.2 | ||
args: --skip-files=xml | ||
only-new-issues: true | ||
- name: go-report-card | ||
uses: creekorful/goreportcard-action@v1.0 | ||
with: | ||
only-new-issues: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Binaries for programs and plugins | ||
*.exe | ||
*.exe~ | ||
*.dll | ||
*.so | ||
*.dylib | ||
|
||
# Test binary, built with `go test -c` | ||
*.test | ||
|
||
# Output of the make coverage target | ||
coverage.* | ||
|
||
# Dependency directories (remove the comment below to include it) | ||
vendor/ | ||
|
||
# Configuration from VSCode | ||
*.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
linters: | ||
enable: | ||
- lll | ||
|
||
linters-settings: | ||
lll: | ||
# max line length, lines longer will be reported. Default is 120. | ||
# '\t' is counted as 1 character by default, and can be changed with the tab-width option | ||
line-length: 120 | ||
# tab width in spaces. Default to 1. | ||
tab-width: 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.3.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- repo: https://github.com/dnephin/pre-commit-golang | ||
rev: v0.5.0 | ||
hooks: | ||
- id: go-fmt | ||
- id: golangci-lint | ||
- id: go-unit-tests | ||
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook | ||
rev: v8.0.0 | ||
hooks: | ||
- id: commitlint | ||
stages: [commit-msg] | ||
additional_dependencies: ['@commitlint/config-conventional'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
denylist: | ||
|
||
allowlist: | ||
- Apache-2.0 | ||
- MIT | ||
- BSD-2-Clause | ||
- BSD-3-Clause | ||
- CC0-1.0 | ||
|
||
exceptions: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. | ||
|
||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), | ||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). | ||
|
||
## [Unreleased] | ||
|
||
### Added | ||
|
||
- ... | ||
|
||
### Changed | ||
|
||
- ... | ||
|
||
### Removed | ||
|
||
- ... | ||
|
||
## [0.1.0] - 2024-01-15 | ||
|
||
### Added | ||
|
||
- initial version of the repo | ||
|
||
[Unreleased]: https://github.com/Eyevinn/mp2ts-tools/releases/tag/v0.1.0...HEAD | ||
[0.1.0]: https://github.com/Eyevinn/mp2ts-tools/releases/tag/v0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# Submitting Issues | ||
|
||
We use GitHub issues to track public bugs. If you are submitting a bug, please provide | ||
as much info as possible to make it easier to reproduce the issue and update unit tests. | ||
|
||
# Contributing Code | ||
|
||
This project uses [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/#summary). | ||
|
||
We follow the [GitHub Flow](https://guides.github.com/introduction/flow/index.html) so all contributions happen through pull requests. We actively welcome your pull requests: | ||
|
||
1. Fork the repo and create your branch from master. | ||
2. If you've added code that should be tested, add tests. | ||
3. If you've changed APIs, update the documentation. | ||
4. Ensure the test suite passes. | ||
5. Issue that pull request! | ||
|
||
When submitting code changes your submissions are understood to be under the same MIT License that covers the project. Feel free to contact Eyevinn Technology if that's a concern. | ||
|
||
# Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment include: | ||
|
||
- Using welcoming and inclusive language | ||
- Being respectful of differing viewpoints and experiences | ||
- Gracefully accepting constructive criticism | ||
- Focusing on what is best for the community | ||
- Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
- The use of sexualized language or imagery and unwelcome sexual attention or advances | ||
- Trolling, insulting/derogatory comments, and personal or political attacks | ||
- Public or private harassment | ||
- Publishing others' private information, such as a physical or electronic address, without explicit permission | ||
- Other conduct which could reasonably be considered inappropriate in a professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
The MIT License (MIT) | ||
Copyright (c) 2023 Eyevinn Technology AB | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
.PHONY: all | ||
all: lint test coverage check-licenses build | ||
|
||
.PHONY: build | ||
build: cmd1 cmd2 | ||
|
||
.PHONY: lint | ||
lint: prepare | ||
golangci-lint run | ||
|
||
.PHONY: prepare | ||
prepare: | ||
go mod vendor | ||
|
||
cmd1 cmd2: | ||
go build -ldflags "-X github.com/Eyevinn/{Name}/internal.commitVersion=$$(git describe --tags HEAD) -X github.com/Eyevinn/{Name}/internal.commitDate=$$(git log -1 --format=%ct)" -o out/$@ ./cmd/$@/main.go | ||
|
||
.PHONY: test | ||
test: prepare | ||
go test ./... | ||
|
||
.PHONY: coverage | ||
coverage: | ||
# Ignore (allow) packages without any tests | ||
set -o pipefail | ||
go test ./... -coverprofile coverage.out | ||
set +o pipefail | ||
go tool cover -html=coverage.out -o coverage.html | ||
go tool cover -func coverage.out -o coverage.txt | ||
tail -1 coverage.txt | ||
|
||
|
||
|
||
.PHONY: clean | ||
clean: | ||
rm -f out/* | ||
rm -r examples-out/* | ||
|
||
.PHONY: install | ||
install: all | ||
cp out/* $(GOPATH)/bin/ | ||
|
||
.PHONY: update | ||
update: | ||
go get -t -u ./... | ||
|
||
.PHONY: check-licenses | ||
check-licenses: prepare | ||
wwhrd check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# go-default | ||
|
||
## Get started | ||
|
||
1. Run go mod init github/Eyevinn/name | ||
2. Edit the installed files appropriately | ||
3. Put any executables in directories with proper names under cmd/cmd1 etc | ||
and update the Makefile | ||
|
||
## Included | ||
|
||
The defaults for all go projects include: | ||
|
||
- A gitignore file | ||
- Github actions for running tests and golang-ci-lint | ||
- A Makefile for running tests, coverage, and update repo | ||
- A README skeleton (update badges to Go, see e.g. mp4ff) | ||
- A CHANGELOG.md file that should be changed manually | ||
- A config file for pre-commit (see https://pre-commit.com) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<h1 align="center"> | ||
Project Name or Logo | ||
</h1> | ||
|
||
<div align="center"> | ||
project name - quick salespitch why this is awesome. | ||
<br /> | ||
<br /> | ||
:book: <b><a href="https://eyevinn.github.io/{{repo-name}}/">Read the documentation (github pages)</a></b> :eyes: | ||
<br /> | ||
</div> | ||
|
||
<div align="center"> | ||
<br /> | ||
|
||
[![npm](https://img.shields.io/npm/v/@eyevinn/{{repo-name}}?style=flat-square)](https://www.npmjs.com/package/@eyevinn/{{repo-name}}) | ||
[![github release](https://img.shields.io/github/v/release/Eyevinn/{{repo-name}}?style=flat-square)](https://github.com/Eyevinn/{{repo-name}}/releases) | ||
[![license](https://img.shields.io/github/license/eyevinn/{{repo-name}}.svg?style=flat-square)](LICENSE) | ||
|
||
[![PRs welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg?style=flat-square)](https://github.com/eyevinn/{{repo-name}}/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) | ||
[![made with hearth by Eyevinn](https://img.shields.io/badge/made%20with%20%E2%99%A5%20by-Eyevinn-59cbe8.svg?style=flat-square)](https://github.com/eyevinn) | ||
[![Slack](http://slack.streamingtech.se/badge.svg)](http://slack.streamingtech.se) | ||
|
||
</div> | ||
|
||
<!-- Add a description of the project here --> | ||
|
||
## Requirements | ||
|
||
<!--Add any external project dependencies such as node.js version etc here --> | ||
|
||
## Installation / Usage | ||
|
||
<!--Add clear instructions on how to use the project here --> | ||
|
||
## Development | ||
|
||
<!--Add clear instructions on how to start development of the project here --> | ||
|
||
## Contributing | ||
|
||
See [CONTRIBUTING](CONTRIBUTING.md) | ||
|
||
## License | ||
|
||
This project is licensed under the MIT License, see [LICENSE](LICENSE). | ||
|
||
# Support | ||
|
||
Join our [community on Slack](http://slack.streamingtech.se) where you can post any questions regarding any of our open source projects. Eyevinn's consulting business can also offer you: | ||
|
||
- Further development of this component | ||
- Customization and integration of this component into your platform | ||
- Support and maintenance agreement | ||
|
||
Contact [sales@eyevinn.se](mailto:sales@eyevinn.se) if you are interested. | ||
|
||
# About Eyevinn Technology | ||
|
||
[Eyevinn Technology](https://www.eyevinntechnology.se) is an independent consultant firm specialized in video and streaming. Independent in a way that we are not commercially tied to any platform or technology vendor. As our way to innovate and push the industry forward we develop proof-of-concepts and tools. The things we learn and the code we write we share with the industry in [blogs](https://dev.to/video) and by open sourcing the code we have written. | ||
|
||
Want to know more about Eyevinn and how it is to work here. Contact us at work@eyevinn.se! |