Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion provider_github.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package gobookmarks
import (
"context"
"encoding/base64"
"encoding/gob"
"fmt"
"log"
"net/http"
Expand All @@ -17,7 +18,10 @@ import (
// GitHubProvider implements Provider for GitHub.
type GitHubProvider struct{}

func init() { RegisterProvider(GitHubProvider{}) }
func init() {
gob.Register(&github.User{})
RegisterProvider(GitHubProvider{})
}

func (GitHubProvider) Name() string { return "github" }

Expand Down
6 changes: 5 additions & 1 deletion provider_gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package gobookmarks
import (
"context"
"encoding/base64"
"encoding/gob"
"errors"
"fmt"
"log"
Expand All @@ -26,7 +27,10 @@ func gitlabUnauthorized(err error) bool {
return errors.As(err, &respErr) && respErr.Response != nil && respErr.Response.StatusCode == http.StatusUnauthorized
}

func init() { RegisterProvider(GitLabProvider{}) }
func init() {
gob.Register(&gitlab.User{})
RegisterProvider(GitLabProvider{})
}

func (GitLabProvider) Name() string { return "gitlab" }

Expand Down
Loading