Skip to content

Commit e85acd1

Browse files
authored
feat: upgrade go version to latest(1.24) (#31)
1 parent 1ea4a51 commit e85acd1

8 files changed

Lines changed: 15 additions & 19 deletions

File tree

.github/workflows/nepali-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Set up Go
2323
uses: actions/setup-go@v5
2424
with:
25-
go-version: 1.19
25+
go-version: 1.24
2626

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

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@
1515
# vendor/
1616

1717
.DS_Store
18+
19+
.idea/

dateConverter/converter.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Package dateConverter
12
// This package contains the date converter functions.
23
//
34
// USAGE:

go.mod

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
module github.com/opensource-nepal/go-nepali
22

3-
go 1.19
3+
go 1.24
4+
5+
require github.com/stretchr/testify v1.10.0
46

57
require (
68
github.com/davecgh/go-spew v1.1.1 // indirect
79
github.com/pmezard/go-difflib v1.0.0 // indirect
8-
github.com/stretchr/objx v0.5.0 // indirect
9-
github.com/stretchr/testify v1.8.1 // indirect
1010
gopkg.in/yaml.v3 v3.0.1 // indirect
1111
)

go.sum

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,10 @@
1-
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
21
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
32
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
43
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
54
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
6-
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
7-
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
8-
github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
9-
github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
10-
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
11-
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
12-
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
13-
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
5+
github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
6+
github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
7+
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
148
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
15-
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
169
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
1710
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

nepalitime/nepalitimeregex.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// contains functionality related to Nepali time pattern matching
1+
// Package nepalitime contains functionality related to Nepali time pattern matching
22
package nepalitime
33

44
import (

nepalitime/parser.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
var nepaliTimeReCache *nepaliTimeRegex
1212

13-
// equivalent to time.Parse()
13+
// Parse is equivalent to time.Parse()
1414
func Parse(datetimeStr string, format string) (*NepaliTime, error) {
1515
nepalitime, err := validate(datetimeStr, format)
1616

nepalitime/utils.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func Date(year, month, day, hour, min, sec, nsec int) (*NepaliTime, error) {
2222
return &NepaliTime{year, month, day, &englishTime}, nil
2323
}
2424

25-
// Converts Time object to NepaliTime
25+
// FromEnglishTime Converts Time object to NepaliTime
2626
func FromEnglishTime(englishTime time.Time) (*NepaliTime, error) {
2727
englishTime = englishTime.In(GetNepaliLocation())
2828
enYear, enMonth, enDay := englishTime.Date()
@@ -57,13 +57,13 @@ func twoDigitNumber(number int) string {
5757
return fmt.Sprint(number)
5858
}
5959

60-
// Gets current English date along with time level precision.
60+
// GetCurrentEnglishTime Gets current English date along with time level precision.
6161
// Current Time of Asia/Kathmandu
6262
func GetCurrentEnglishTime() time.Time {
6363
return time.Now().In(GetNepaliLocation())
6464
}
6565

66-
// Returns location for Asia/Kathmandu (constants.Timezone)
66+
// GetNepaliLocation Returns location for Asia/Kathmandu (constants.Timezone)
6767
func GetNepaliLocation() *time.Location {
6868
location, _ := time.LoadLocation(constants.Timezone)
6969
// ignoring error since location with Asia/Kathmandu will not fail.

0 commit comments

Comments
 (0)