Skip to content

Commit

Permalink
Move module to maragu.dev/errors (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
markuswustenberg authored Sep 10, 2024
1 parent 0cd6bad commit 6b461e4
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 118 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

jobs:
test:
name: Test
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true

- name: Build
run: go build -v ./...

- name: Test
run: go test -v -coverprofile=cover.out -shuffle on ./...

lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
check-latest: true

- name: Lint
uses: golangci/golangci-lint-action@v4
with:
version: latest
66 changes: 0 additions & 66 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

41 changes: 0 additions & 41 deletions .github/workflows/go.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Maragu ApS
Copyright (c) Maragu ApS

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
.PHONY: cover lint test

.PHONY: cover
cover:
go tool cover -html=cover.out

.PHONY: lint
lint:
golangci-lint run

.PHONY: test
test:
go test -coverprofile=cover.out ./...

go test -coverprofile=cover.out -shuffle on ./...
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# errors

[![GoDoc](https://godoc.org/github.com/maragudk/errors?status.svg)](https://godoc.org/github.com/maragudk/errors)
[![GoDoc](https://pkg.go.dev/badge/maragu.dev/errors)](https://pkg.go.dev/maragu.dev/errors)
[![Go](https://github.com/maragudk/errors/actions/workflows/ci.yml/badge.svg)](https://github.com/maragudk/errors/actions/workflows/ci.yml)

Module `github.com/maragudk/errors` provides `Wrap` in addition to the functions in the stdlib errors package.
It's otherwise a drop-in replacement for the stdlib package.
A simple wrapper around stdlib `errors` package, that adds a `Wrap` function.

```shell
go get maragu.dev/errors
```

Made in 🇩🇰 by [maragu](https://www.maragu.dk/), maker of [online Go courses](https://www.golang.dk/).
2 changes: 1 addition & 1 deletion errors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package errors_test
import (
"testing"

"github.com/maragudk/errors"
"maragu.dev/errors"
)

func TestWrap(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/maragudk/errors
module maragu.dev/errors

go 1.15
go 1.18

0 comments on commit 6b461e4

Please sign in to comment.