Skip to content

Commit

Permalink
Merge pull request #5 from goark/migrate-repos
Browse files Browse the repository at this point in the history
Migrated repository to github.com/goark/koyomi
  • Loading branch information
spiegel-im-spiegel committed Mar 20, 2022
2 parents b4f7be0 + 448d721 commit 98592e4
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 95 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ^1.17
go-version: ^1.18
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: latest
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/vulns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,9 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ^1.17
go-version: ^1.18
- name: install depm
run: |
pushd $RUNNER_TEMP
curl -Lfs -o depm.tar.gz https://github.com/spiegel-im-spiegel/depm/releases/download/v0.4.4/depm_0.4.4_Linux_64bit.tar.gz
sudo tar -xzf depm.tar.gz
sudo mv depm /usr/local/bin/depm
popd
run: go install github.com/goark/depm@latest
- name: WriteGoList
run: depm list --json > go.list
- name: Nancy
Expand Down
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# [koyomi] -- 日本のこよみ

[![check vulns](https://github.com/spiegel-im-spiegel/koyomi/workflows/vulns/badge.svg)](https://github.com/spiegel-im-spiegel/koyomi/actions)
[![lint status](https://github.com/spiegel-im-spiegel/koyomi/workflows/lint/badge.svg)](https://github.com/spiegel-im-spiegel/koyomi/actions)
[![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/spiegel-im-spiegel/koyomi/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/spiegel-im-spiegel/koyomi.svg)](https://github.com/spiegel-im-spiegel/koyomi/releases/latest)
[![check vulns](https://github.com/goark/koyomi/workflows/vulns/badge.svg)](https://github.com/goark/koyomi/actions)
[![lint status](https://github.com/goark/koyomi/workflows/lint/badge.svg)](https://github.com/goark/koyomi/actions)
[![GitHub license](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/goark/koyomi/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/goark/koyomi.svg)](https://github.com/goark/koyomi/releases/latest)

**Migrated repository to [github.com/goark/koyomi][koyomi]**

[国立天文台 天文情報センター 暦計算室](http://eco.mtk.nao.ac.jp/koyomi/)」より日本の暦情報を取得する [Go 言語]用パッケージです。 Google Calendar を経由して取得しています。

Expand Down Expand Up @@ -62,4 +64,4 @@ io.Copy(os.Stdout, bytes.NewReader(csv))
- [日本の暦情報を取得するパッケージを作ってみた — リリース情報 | text.Baldanders.info](https://text.baldanders.info/release/2020/05/koyomi/)

[Go 言語]: https://golang.org/ "The Go Programming Language"
[koyomi]: https://github.com/spiegel-im-spiegel/koyomi "spiegel-im-spiegel/koyomi: 日本のこよみ"
[koyomi]: https://github.com/goark/koyomi "goark/koyomi: 日本のこよみ"
6 changes: 3 additions & 3 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ tasks:
cmds:
- go mod verify
- go test -shuffle on ./...
- docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.42.0 golangci-lint run --enable gosec --timeout 3m0s ./...
- docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.45.0 golangci-lint run --enable gosec --timeout 3m0s ./...
sources:
- ./go.mod
- '**/*.go'

nancy:
desc: Check vulnerability of external packages with Nancy.
cmds:
- depm list -j | docker run --rm -i sonatypecommunity/nancy:latest sleuth -n
- depm list -j | nancy sleuth -n
sources:
- ./go.mod
- '**/*.go'
Expand All @@ -32,7 +32,7 @@ tasks:
- rm -f ./go.sum
- go clean -cache
- go clean -modcache
- go mod tidy -v -go=1.17
- go mod tidy -v -go=1.18

graph:
desc: Make grapth of dependency modules.
Expand Down
2 changes: 1 addition & 1 deletion date.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
"time"

"github.com/spiegel-im-spiegel/errs"
"github.com/goark/errs"
)

var (
Expand Down
Binary file modified dependency.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 6 additions & 22 deletions ecode/ecode.go
Original file line number Diff line number Diff line change
@@ -1,30 +1,14 @@
package ecode

import "fmt"
import "errors"

//ECode is error codes for books-data
type ECode int

const (
ErrNullPointer ECode = iota + 1
ErrNoData
ErrInvalidRecord
var (
ErrNullPointer = errors.New("Null reference instance")
ErrNoData = errors.New("No data")
ErrInvalidRecord = errors.New("Invalid record")
)

var errMessages = map[ECode]string{
ErrNullPointer: "Null reference instance",
ErrNoData: "No data",
ErrInvalidRecord: "Invalid record",
}

func (e ECode) Error() string {
if s, ok := errMessages[e]; ok {
return s
}
return fmt.Sprintf("unknown error (%d)", int(e))
}

/* Copyright 2020 Spiegel
/* Copyright 2020-2022 Spiegel
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
42 changes: 0 additions & 42 deletions ecode/ecode_test.go

This file was deleted.

4 changes: 2 additions & 2 deletions events.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"sort"
"strconv"

"github.com/spiegel-im-spiegel/errs"
"github.com/spiegel-im-spiegel/koyomi/ecode"
"github.com/goark/errs"
"github.com/goark/koyomi/ecode"
)

//Event is koyomi event data
Expand Down
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os"
"time"

"github.com/spiegel-im-spiegel/koyomi"
"github.com/goark/koyomi"
)

func ExampleKoyomi() {
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module github.com/spiegel-im-spiegel/koyomi
module github.com/goark/koyomi

go 1.17
go 1.18

require (
github.com/PuloV/ics-golang v0.0.0-20190808201353-a3394d3bcade
github.com/spiegel-im-spiegel/errs v1.0.5
github.com/goark/errs v1.1.0
)

require (
github.com/channelmeter/iso8601duration v0.0.0-20150204201828-8da3af7a2a61 // indirect
github.com/stretchr/testify v1.7.0 // indirect
github.com/stretchr/testify v1.7.1 // indirect
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ github.com/channelmeter/iso8601duration v0.0.0-20150204201828-8da3af7a2a61 h1:o6
github.com/channelmeter/iso8601duration v0.0.0-20150204201828-8da3af7a2a61/go.mod h1:Rp8e0DCtEKwXFOC6JPJQVTz8tuGoGvw6Xfexggh/ed0=
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/goark/errs v1.1.0 h1:FKnyw4LVyRADIjM8Nj0Up6r0/y5cfADvZAd1E+tthXE=
github.com/goark/errs v1.1.0/go.mod h1:TtaPEoadm2mzqzfXdkkfpN2xuniCFm2q4JH+c1qzaqw=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/spiegel-im-spiegel/errs v1.0.5 h1:5qAUEXPZgF4ZIUmw2vpe7OgDP0C8DIV67BKwjfLidJI=
github.com/spiegel-im-spiegel/errs v1.0.5/go.mod h1:mOsWcUc9hpRXjwdgJqJ3E2n6ibkYFvhNck1QD0ZVGOM=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
4 changes: 2 additions & 2 deletions source.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package koyomi

import (
ics "github.com/PuloV/ics-golang"
"github.com/spiegel-im-spiegel/errs"
"github.com/spiegel-im-spiegel/koyomi/ecode"
"github.com/goark/errs"
"github.com/goark/koyomi/ecode"
)

//Source is information of data source for koyomi
Expand Down

0 comments on commit 98592e4

Please sign in to comment.