mirror of
https://github.com/gofiber/storage.git
synced 2025-10-06 17:17:18 +08:00
🎨 update installation
This commit is contained in:
@@ -4,6 +4,7 @@ A Postgres storage driver using [lib/pq](https://github.com/lib/pq).
|
||||
|
||||
### Table of Contents
|
||||
- [Signatures](#signatures)
|
||||
- [Installation](#installation)
|
||||
- [Examples](#examples)
|
||||
- [Config](#config)
|
||||
- [Default Config](#default-config)
|
||||
@@ -19,6 +20,15 @@ func (s *Storage) Set(key string, val []byte, exp time.Duration) error
|
||||
func (s *Storage) Delete(key string) error
|
||||
func (s *Storage) Clear() error
|
||||
```
|
||||
### Installation
|
||||
Postgres is tested on the 2 last [Go versions](https://golang.org/dl/) with support for modules. So make sure to initialize one first if you didn't do that yet:
|
||||
```bash
|
||||
go mod init github.com/<user>/<repo>
|
||||
```
|
||||
And then install the postgres implementation:
|
||||
```bash
|
||||
go get github.com/gofiber/storage/postgres
|
||||
```
|
||||
|
||||
### Examples
|
||||
Import the storage package.
|
||||
|
Reference in New Issue
Block a user