mirror of
https://github.com/Threnklyn/jira.git
synced 2026-05-23 14:28:27 +02:00
udpate to use latest dep, update figtree
This commit is contained in:
-45
@@ -1,45 +0,0 @@
|
||||
# keyring provides cross-platform keychain access
|
||||
|
||||
http://godoc.org/github.com/tmc/keyring
|
||||
|
||||
Keyring provides a common interface to keyring/keychain tools.
|
||||
|
||||
License: ISC
|
||||
|
||||
Currently implemented:
|
||||
- OSX
|
||||
- SecretService
|
||||
- gnome-keychain (via "gnome_keyring" build flag)
|
||||
|
||||
Contributions welcome!
|
||||
|
||||
Usage example:
|
||||
|
||||
```go
|
||||
err := keyring.Set("libraryFoo", "jack", "sacrifice")
|
||||
password, err := keyring.Get("libraryFoo", "jack")
|
||||
fmt.Println(password) //Output: sacrifice
|
||||
```
|
||||
|
||||
## Linux
|
||||
|
||||
Linux requirements:
|
||||
|
||||
### SecretService provider
|
||||
|
||||
- dbus
|
||||
|
||||
### gnome-keychain provider
|
||||
|
||||
- gnome-keychain headers
|
||||
- Ubuntu/Debian: `libsecret-dev`
|
||||
- Fedora: `libsecret-devel`
|
||||
- Archlinux: `libsecret`
|
||||
|
||||
Tests on Linux:
|
||||
```sh
|
||||
$ go test github.com/tmc/keyring
|
||||
$ # for gnome-keyring provider
|
||||
$ go test -tags gnome_keyring github.com/tmc/keyring
|
||||
```
|
||||
|
||||
-30
@@ -1,30 +0,0 @@
|
||||
package keyring
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestBasicSetGet(t *testing.T) {
|
||||
var (
|
||||
pw string
|
||||
err error
|
||||
)
|
||||
pw, err = Get("keyring-test", "jack")
|
||||
if err != nil {
|
||||
// ok on initial invokation
|
||||
fmt.Println("Get() error:", err)
|
||||
}
|
||||
err = Set("keyring-test", "jack", "test")
|
||||
if err != nil {
|
||||
t.Error("Set() error:", err)
|
||||
}
|
||||
pw, err = Get("keyring-test", "jack")
|
||||
if err != nil {
|
||||
t.Error("Get() error:", err)
|
||||
}
|
||||
|
||||
if pw != "test" {
|
||||
fmt.Errorf("expected 'test', got '%s'", pw)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user