Skip to content

Commit

Permalink
Merge pull request #3 from opensource-nepal/fix-install-issue
Browse files Browse the repository at this point in the history
Fix install issue
  • Loading branch information
aj3sh authored Feb 9, 2023
2 parents b7163de + c00b888 commit bf89b6b
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ We'll try to include all the features provided in the aforementioned package. We
To install this package use `go get`

```shell
$ go get -u github.com/opensource-nepal/nepali
$ go get -u github.com/opensource-nepal/go-nepali
```

Or if there is some error then, use `go install`

```shell
$ go install github.com/opensource-nepal/nepali
$ go install github.com/opensource-nepal/go-nepali
```

#### Usage
Expand All @@ -35,7 +35,7 @@ In this package, we provide 2 `go` packages, `nepalitime` and `dateConverter`.
1. To get a Nepali datetime object:

```go
import "github.com/opensource-nepal/nepali/nepalitime"
import "github.com/opensource-nepal/go-nepali/nepalitime"

npTime, err := nepalitime.Date(2079, 10, 15, 14, 29, 6, 7)
```
Expand All @@ -50,7 +50,7 @@ In this package, we provide 2 `go` packages, `nepalitime` and `dateConverter`.
2. If you already have a `time.Time` object then, you can get the corresponding `NepaliTime` object using the function `FromEnglishTime`:

```go
import "github.com/opensource-nepal/nepali/nepalitime"
import "github.com/opensource-nepal/go-nepali/nepalitime"
// just to ensure that the timezone is Asia/Kathmandu
// else the time will be adjusted accordingly
Expand All @@ -61,7 +61,7 @@ In this package, we provide 2 `go` packages, `nepalitime` and `dateConverter`.
3. To parse a datestring into a `NepaliTime` object the `Parse` function can be used. This is the Nepali equivalent of the `time.Parse` function of go but instead of using the time parsing format of `Mon Jan 2 15:04:05 -0700 MST 2006` we decided to go with the `%Y/%m/%d` style parsing. We intend on supporting the go style formatting in the upcoming releases. Please see [directives](#date-directives) section to know which directives we support.

```go
import "github.com/opensource-nepal/nepali/nepalitime"
import "github.com/opensource-nepal/go-nepali/nepalitime"
datetimeStr := "2079/10/14"
format := "%Y/%m/%d"
Expand All @@ -72,15 +72,15 @@ In this package, we provide 2 `go` packages, `nepalitime` and `dateConverter`.
4. To get current Nepali time:

```go
import "github.com/opensource-nepal/nepali/nepalitime"
import "github.com/opensource-nepal/go-nepali/nepalitime"
npTime := nepalitime.Now()
```

5. To get the current English time in Nepal:

```go
import "github.com/opensource-nepal/nepali/nepalitime"
import "github.com/opensource-nepal/go-nepali/nepalitime"
enTime := nepalitime.GetCurrentEnglishTime()
```
Expand All @@ -90,7 +90,7 @@ In this package, we provide 2 `go` packages, `nepalitime` and `dateConverter`.
1. This is one of the core functionalities in which an English date(not an object) is converted to Nepali date in parts i.e. year, month, day in an array:

```go
import "github.com/opensource-nepal/nepali/nepalitime"
import "github.com/opensource-nepal/go-nepali/nepalitime"
// npDate is an array of 3 length which contains
// year, month and day sequential form
Expand All @@ -100,7 +100,7 @@ In this package, we provide 2 `go` packages, `nepalitime` and `dateConverter`.
2. To convert a Nepali date(not an object) to English date in parts i.e. year, month, day in an array:

```go
import "github.com/opensource-nepal/nepali/nepalitime"
import "github.com/opensource-nepal/go-nepali/nepalitime"
// enDate is an array of 3 length which contains
// year, month and day sequential form
Expand Down
4 changes: 2 additions & 2 deletions dateConverter/converter_test.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Unit tests for date converter
//
// To run only this test
// go test -v github.com/opensource-nepal/nepali/dateConverter
// go test -v github.com/opensource-nepal/go-nepali/dateConverter
package dateConverter_test

import (
"testing"

"github.com/opensource-nepal/nepali/dateConverter"
"github.com/opensource-nepal/go-nepali/dateConverter"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/opensource-nepal/nepali
module github.com/opensource-nepal/go-nepali

go 1.19

Expand Down
6 changes: 3 additions & 3 deletions nepalitime/nepalitime_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Unit tests for NepaliTime object
//
// To run only this test
// go test -v github.com/opensource-nepal/nepali/nepalitime
// go test -v github.com/opensource-nepal/go-nepali/nepalitime
package nepalitime_test

import (
"testing"
"time"

"github.com/opensource-nepal/nepali/constants"
"github.com/opensource-nepal/nepali/nepalitime"
"github.com/opensource-nepal/go-nepali/constants"
"github.com/opensource-nepal/go-nepali/nepalitime"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion nepalitime/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"testing"

"github.com/opensource-nepal/nepali/nepalitime"
"github.com/opensource-nepal/go-nepali/nepalitime"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions nepalitime/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"time"

"github.com/opensource-nepal/nepali/constants"
"github.com/opensource-nepal/nepali/dateConverter"
"github.com/opensource-nepal/go-nepali/constants"
"github.com/opensource-nepal/go-nepali/dateConverter"
)

// Date returns the Time corresponding to
Expand Down
4 changes: 2 additions & 2 deletions nepalitime/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"testing"
"time"

"github.com/opensource-nepal/nepali/constants"
"github.com/opensource-nepal/nepali/nepalitime"
"github.com/opensource-nepal/go-nepali/constants"
"github.com/opensource-nepal/go-nepali/nepalitime"
"github.com/stretchr/testify/assert"
)

Expand Down

0 comments on commit bf89b6b

Please sign in to comment.