Skip to content

Commit

Permalink
modernize the framework
Browse files Browse the repository at this point in the history
  • Loading branch information
koron committed Apr 3, 2024
1 parent d374719 commit 387e6ff
Show file tree
Hide file tree
Showing 8 changed files with 84 additions and 12 deletions.
10 changes: 0 additions & 10 deletions .circleci/config.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* -text
29 changes: 29 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Go

on: [push]

env:
GO_VERSION: '>=1.21.0'

jobs:

build:
name: Build
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
steps:

- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- run: go test

- run: go build

# based on: github.com/koron-go/_skeleton/.github/workflows/go.yml
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
*~
default.pgo
tags
tmp/
42 changes: 42 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
TEST_PACKAGE ?= ./...

.PHONY: build
build:
go build -gcflags '-e'

.PHONY: test
test:
go test $(TEST_PACKAGE)

.PHONY: bench
bench:
go test -bench $(TEST_PACKAGE)

.PHONY: tags
tags:
gotags -f tags -R .

.PHONY: cover
cover:
mkdir -p tmp
go test -coverprofile tmp/_cover.out $(TEST_PACKAGE)
go tool cover -html tmp/_cover.out -o tmp/cover.html

.PHONY: checkall
checkall: vet staticcheck

.PHONY: vet
vet:
go vet $(TEST_PACKAGE)

.PHONY: staticcheck
staticcheck:
staticcheck $(TEST_PACKAGE)

.PHONY: clean
clean:
go clean
rm -f tags
rm -f tmp/_cover.out tmp/cover.html

# based on: github.com/koron-go/_skeleton/Makefile
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# koron-go/dialsrv

[![GoDoc](https://godoc.org/github.com/koron-go/dialsrv?status.svg)](https://godoc.org/github.com/koron-go/dialsrv)
[![CircleCI](https://img.shields.io/circleci/project/github/koron-go/dialsrv/master.svg)](https://circleci.com/gh/koron-go/dialsrv/tree/master)
[![PkgGoDev](https://pkg.go.dev/badge/github.com/koron-go/dialsrv)](https://pkg.go.dev/github.com/koron-go/dialsrv)
[![Actions/Go](https://github.com/koron-go/dialsrv/workflows/Go/badge.svg)](https://github.com/koron-go/dialsrv/actions?query=workflow%3AGo)
[![Go Report Card](https://goreportcard.com/badge/github.com/koron-go/dialsrv)](https://goreportcard.com/report/github.com/koron-go/dialsrv)

Dialer with SRV lookup.
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/koron-go/dialsrv

go 1.21
5 changes: 5 additions & 0 deletions staticcheck.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# vim:set ft=toml:

checks = ["all"]

# based on: github.com/koron-go/_skeleton/staticcheck.conf

0 comments on commit 387e6ff

Please sign in to comment.