From aa0afa8d943055aea924db76719f0368d8925483 Mon Sep 17 00:00:00 2001 From: dudaodong Date: Tue, 29 Mar 2022 11:01:06 +0800 Subject: [PATCH] release v1.2.7 --- README.md | 2 +- README_zh-CN.md | 2 +- datetime/conversion_test.go | 13 ++++++------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d2acd9e..20ef768 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@
![Go version](https://img.shields.io/badge/go-%3E%3D1.16-9cf) -[![Release](https://img.shields.io/badge/release-2.0.1-green.svg)](https://github.com/duke-git/lancet/releases) +[![Release](https://img.shields.io/badge/release-2.0.2-green.svg)](https://github.com/duke-git/lancet/releases) [![GoDoc](https://godoc.org/github.com/duke-git/lancet/v2?status.svg)](https://pkg.go.dev/github.com/duke-git/lancet/v2) [![Go Report Card](https://goreportcard.com/badge/github.com/duke-git/lancet/v2)](https://goreportcard.com/report/github.com/duke-git/lancet/v2) [![test](https://github.com/duke-git/lancet/actions/workflows/codecov.yml/badge.svg?branch=main&event=push)](https://github.com/duke-git/lancet/actions/workflows/codecov.yml) diff --git a/README_zh-CN.md b/README_zh-CN.md index 76de379..6502c78 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -4,7 +4,7 @@
![Go version](https://img.shields.io/badge/go-%3E%3D1.16-9cf) -[![Release](https://img.shields.io/badge/release-2.0.1-green.svg)](https://github.com/duke-git/lancet/releases) +[![Release](https://img.shields.io/badge/release-2.0.2-green.svg)](https://github.com/duke-git/lancet/releases) [![GoDoc](https://godoc.org/github.com/duke-git/lancet/v2?status.svg)](https://pkg.go.dev/github.com/duke-git/lancet/v2) [![Go Report Card](https://goreportcard.com/badge/github.com/duke-git/lancet/v2)](https://goreportcard.com/report/github.com/duke-git/lancet/v2) [![test](https://github.com/duke-git/lancet/actions/workflows/codecov.yml/badge.svg?branch=main&event=push)](https://github.com/duke-git/lancet/actions/workflows/codecov.yml) diff --git a/datetime/conversion_test.go b/datetime/conversion_test.go index a8219ab..6319da0 100644 --- a/datetime/conversion_test.go +++ b/datetime/conversion_test.go @@ -19,10 +19,10 @@ func TestToUnix(t *testing.T) { func TestToFormat(t *testing.T) { assert := internal.NewAssert(t, "TestToFormat") - tm, err := NewFormat("2022/03/18 17:04:05") + _, err := NewFormat("2022/03/18 17:04:05") assert.IsNotNil(err) - tm, err = NewFormat("2022-03-18 17:04:05") + tm, err := NewFormat("2022-03-18 17:04:05") assert.IsNil(err) t.Log("ToFormat -> ", tm.ToFormat()) @@ -31,23 +31,22 @@ func TestToFormat(t *testing.T) { func TestToFormatForTpl(t *testing.T) { assert := internal.NewAssert(t, "TestToFormatForTpl") - tm, err := NewFormat("2022/03/18 17:04:05") + _, err := NewFormat("2022/03/18 17:04:05") assert.IsNotNil(err) - tm, err = NewFormat("2022-03-18 17:04:05") + tm, err := NewFormat("2022-03-18 17:04:05") assert.IsNil(err) t.Log("ToFormatForTpl -> ", tm.ToFormatForTpl("2006/01/02 15:04:05")) - } func TestToIso8601(t *testing.T) { assert := internal.NewAssert(t, "TestToIso8601") - tm, err := NewISO8601("2022-03-18 17:04:05") + _, err := NewISO8601("2022-03-18 17:04:05") assert.IsNotNil(err) - tm, err = NewISO8601("2006-01-02T15:04:05.999Z") + tm, err := NewISO8601("2006-01-02T15:04:05.999Z") assert.IsNil(err) t.Log("ToIso8601 -> ", tm.ToIso8601())