Skip to content

Commit

Permalink
Update module to new major version
Browse files Browse the repository at this point in the history
- Is now `github.com/glenvan/ttl/v2`
  • Loading branch information
glenvan committed Nov 12, 2023
1 parent 46e0b4f commit 5d4b760
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 8 deletions.
24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,28 @@ few enhancements and creature-comforts:

`ttl` requires Go v1.21.

## Installation

To use this module in your project, run:

```bash
go get -u github.com/glenvan/ttl/v2
```

... and import the `ttl` package into your Go code using:

```go
package main

import (
"github.com/glenvan/ttl/v2"
)

func example() {
tm := ttl.NewMap(...)
}
```

## License

This project is licensed under the terms of [the MIT License](./LICENSE). It derives from
Expand All @@ -62,7 +84,7 @@ import (
"fmt"
"time"

"github.com/glenvan/ttl"
"github.com/glenvan/ttl/v2"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions Taskfile.dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ version: '3'
output: 'prefixed'

vars:
PKG_NAME: github.com/glenvan/ttl
PKG_VERSION: v2.0.0
PKG_NAME: github.com/glenvan/ttl/v2
PKG_VERSION: v2.0.1

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

"github.com/glenvan/ttl"
"github.com/glenvan/ttl/v2"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion example/small/small.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

"github.com/glenvan/ttl"
"github.com/glenvan/ttl/v2"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"fmt"
"time"

"github.com/glenvan/ttl"
"github.com/glenvan/ttl/v2"
)

func ExampleMap() {
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/glenvan/ttl
module github.com/glenvan/ttl/v2

go 1.21

Expand Down
2 changes: 1 addition & 1 deletion map_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/fortytw2/leaktest"
"github.com/stretchr/testify/suite"

"github.com/glenvan/ttl"
"github.com/glenvan/ttl/v2"
)

type MapTestSuite struct {
Expand Down

0 comments on commit 5d4b760

Please sign in to comment.