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
17 changes: 17 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directories:
- "/"
schedule:
interval: "monthly"
labels:
- "dependencies"
- package-ecosystem: "gomod"
directories:
- "/"
schedule:
interval: "monthly"
labels:
- "dependencies"

19 changes: 8 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,22 @@ jobs:
- uses: hashicorp/setup-copywrite@v1.1.3
- name: verify copyright
run: |
copywrite --config=.github/workflows/scripts/copywrite.hcl \
copywrite --config .github/workflows/scripts/copywrite.hcl \
headers --spdx "BSD-3-Clause" --plan
run-lint:
timeout-minutes: 5
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: golangci/golangci-lint-action@v6
with:
version: v1.60.3
args: --config .github/workflows/scripts/golangci.yaml
run-tests:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: extractions/setup-just@v2
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache-dependency-path: '**/go.sum'
- name: Show System
run: |
uname -a
just sysinfo
- name: Run Go Test
run: |
make test
just init tidy lint test

4 changes: 2 additions & 2 deletions .github/workflows/scripts/copywrite.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ schema_version = 1

project {
license = "BSD-3-Clause"
copyright_holder = "NOXIDE.LOL"
copyright_year = 2023
copyright_holder = "CattleCloud LLC"
copyright_year = 2024
header_ignore = [
".golangci.yaml",
".copywrite.hcl",
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ linters:
- asciicheck
- bidichk
- bodyclose
- copyloopvar
- dogsled
- dupword
- durationcheck
- errcheck
- errname
- errorlint
- exhaustive
- exportloopref
- gochecknoinits
- gocritic
- gofmt
Expand Down
28 changes: 12 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
# If you prefer the allow list template instead of the deny list, see community template:
# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
#
# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib
*~
~*

# Test binary, built with `go test -c`
*.test
# OS files
**/.DS_Store

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/
# Build artifacts
site

# Go workspace file
go.work
go.work.sum

# Local source and binary files
.src/
.bin/

47 changes: 47 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
set shell := ["bash", "-u", "-c"]

export scripts := ".github/workflows/scripts"
export GOBIN := `echo $PWD/.bin`

# show available commands
[private]
default:
@just --list

# tidy up Go modules
[group('build')]
tidy:
go mod tidy

# run tests across source tree
[group('build')]
test:
go test -v -race -count=1 ./...

# ensure copywrite headers present on source files
[group('lint')]
copywrite:
copywrite \
--config {{scripts}}/copywrite.hcl headers \
--spdx "BSD-3-Clause"

# apply go vet command on source tree
[group('lint')]
vet:
go vet ./...

# apply golangci-lint linters on source tree
[group('lint')]
lint: vet
$GOBIN/golangci-lint run --config .github/workflows/scripts/golangci.yaml

# show host system information
[group('build')]
@sysinfo:
echo "{{os()/arch()}} {{num_cpus()}}c"

# locally install build dependencies
[group('build')]
init:
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.62.2

26 changes: 0 additions & 26 deletions Makefile

This file was deleted.

21 changes: 12 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
# xtc
# scope

[![Go Reference](https://pkg.go.dev/badge/noxide.lol/go/xtc.svg)](https://pkg.go.dev/noxide.lol/go/xtc)
[![License](https://img.shields.io/github/license/noxideproject/xtc?color=7C00D8&style=flat-square&label=License)](https://github.com/noxideproject/xtc/blob/main/LICENSE)
[![Build](https://img.shields.io/github/actions/workflow/status/noxideproject/xtc/ci.yaml?style=flat-square&color=0FAA07&label=Tests)](https://github.com/noxideproject/xtc/actions/workflows/ci.yaml)
[![Go Reference](https://pkg.go.dev/badge/cattlecloud.net/go/scope.svg)](https://pkg.go.dev/cattlecloud.net/go/scope)
[![License](https://img.shields.io/github/license/cattlecloud/scope?color=7C00D8&style=flat-square&label=License)](https://github.com/cattlecloud/scope/blob/main/LICENSE)
[![Build](https://img.shields.io/github/actions/workflow/status/cattlecloud/scope/ci.yaml?style=flat-square&color=0FAA07&label=Tests)](https://github.com/cattlecloud/scope/actions/workflows/ci.yaml)

`xtc` is a substitute for the Go context package.
`scope` is a substitute for the Go context package.

It provides a more convenient context API than the standard library, while
maintaining 100% compatibility.

### Requirements

The minimum Go version is `go1.21`.
The minimum Go version is `go1.23`.

### Install

Use `go get` to grab the latest version of `xtc`.
The `forms` package can be added to a project with `go get`.

```shell
go get -u noxide.lol/go/xtc@latest
go get -u cattlecloud.net/go/scope@latest
```

### License

Open source under the [BSD-3-Clause](LICENSE)
The `cattlecloud.net/go/scope` module is open source under the [BSD](LICENSE) license.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module noxide.lol/go/xtc
module cattlecloud.net/go/scope

go 1.21
go 1.23
Loading