rsrc
golangci-lint-action
Our great sponsors
rsrc | golangci-lint-action | |
---|---|---|
3 | 3 | |
1,180 | 970 | |
- | 3.9% | |
0.0 | 9.3 | |
12 months ago | 12 days ago | |
Go | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rsrc
-
New feature for Go - add method to get the operating system version
One problem is, on Windows, this is impossible without bundling your application with a compiled manifest (I use github.com/akavel/rsrc. It's a horrible state of affairs brought about by backwards compatibility, but without it when you ask for a version, you'll get Windows 8 no matter what.
-
Looking for an interesting project to contribute
https://github.com/akavel/rsrc/ - could take some support for version info - it's probably currently the most requested feature in it; as to UX my preference would be for passing it via JSON; some basic barebones tests would also be good, I mean to roughly verify that the version actually gets added successfully, via some powershell/vbscript script or something;
-
CLI for Windows with Go
When embed data to Go binary, need to prepare syso file. There is a tool called rsrc that will generate syso file for embedding in the rsrc section, so let's use that.
golangci-lint-action
-
Using Private Go Modules with golangci-lint in GitHub Actions
# source: https://github.com/golangci/golangci-lint-action?tab=readme-ov-file#how-to-use name: golangci-lint on: push: branches: - master - main pull_request: permissions: contents: read # Optional: allow read access to pull request. Use with `only-new-issues` option. # pull-requests: read 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: # Require: The version of golangci-lint to use. # When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version. # When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit. version: v1.54 # Optional: working directory, useful for monorepos # working-directory: somedir # Optional: golangci-lint command line arguments. # # Note: By default, the `.golangci.yml` file should be at the root of the repository. # The location of the configuration file can be changed by using `--config=` # args: --timeout=30m --config=/my/path/.golangci.yml --issues-exit-code=0 # Optional: show only new issues if it's a pull request. The default value is `false`. # only-new-issues: true # Optional: if set to true, then all caching functionality will be completely disabled, # takes precedence over all other caching options. # skip-cache: true # Optional: if set to true, then the action won't cache or restore ~/go/pkg. # skip-pkg-cache: true # Optional: if set to true, then the action won't cache or restore ~/.cache/go-build. # skip-build-cache: true # Optional: The mode to install golangci-lint. It can be 'binary' or 'goinstall'. # install-mode: "goinstall"
-
Go Package CI/CD with GitHub Actions
Finally, we can use golangci-lint's provided GitHub Action for linting - it runs golangci-lint on the workflow runner's clone of the repo and outputs an error code if any Go file in the repo fails rules of any linters in golangci-lint. Note that golangci-lint fails if the AST cannot be parsed (i.e. if there are any syntax errors), so it can also be used for checking syntax correctness, which itself is a good proxy for checking for merge conflict strings. We can fail-fast with any checks this way - there's no need to spin up a compilation and a go test invocation if there are syntax errors.
-
CLI for Windows with Go
If you want to run golangci-lint in CI, you can use golangci-lint-action same as other actions.
What are some alternatives?
go-winres - Command line tool for adding Windows resources to executable files
golangci-lint - Fast linters Runner for Go
space-cloud - Open source Firebase + Heroku to develop, scale and secure serverless apps on Kubernetes
setup-go - Set up your GitHub Actions workflow with a specific version of Go
2goarray - A simple utility to encode a file (or any other data) into a Go byte array.
action-gh-release - 📦 :octocat: GitHub Action for creating GitHub Releases
sdp - A Go implementation of the SDP
cargo-install - GitHub action for cached Rust crates installation.
Pion WebRTC - Pure Go implementation of the WebRTC API
checkout - Action for checking out a repo
golive - ⚡ Live views for GoLang with reactive HTML over WebSockets 🔌
cli-for-windows