package
module
Version:
v0.1.0
Opens a new window with list of versions in this module.
Published: May 22, 2023
License: MIT
Opens a new window with license information.
Imports: 12
Opens a new window with list of imports.
Imported by: 6
Opens a new window with list of known importers.
README
¶
Repl.it Database Go client

The easiest way to use Repl.it Database from your Go repls.
Try it out on Repl.it!
package main
import (
"fmt"
"github.com/replit/database-go"
)
func main() {
database.Set("key", "value")
val, _ := database.Get("key")
fmt.Println(val)
// Output: value
}
View the docs for more info
about how to use the client to interact with Database.
Documentation
¶
Package database provides methods for interacting with Repl.it Database.
It just works if used within a repl.
ErrNotFound indicates that the requested key does not exist.
Delete removes the provided key.
Get returns the value for the provided key. It returns ErrNotFound if the key
does not exist.
ListKeys returns a slice of all keys that begin with the provided prefix.
They are sorted in lexicographic order.
Set creates or updates the provided key with the provided value.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.