1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

Don't define methods both on instance and pointer

See https://go.dev/tour/methods/8
This commit is contained in:
jvoisin 2025-01-20 16:14:35 +01:00 committed by Frédéric Guillot
parent 8c5f88ac62
commit 9657bf1f5b
2 changed files with 3 additions and 3 deletions

View file

@ -24,7 +24,7 @@ type SessionData struct {
WebAuthnSessionData WebAuthnSession `json:"webauthn_session_data"`
}
func (s SessionData) String() string {
func (s *SessionData) String() string {
return fmt.Sprintf(`CSRF=%q, OAuth2State=%q, OAuth2CodeVerifier=%q, FlashMsg=%q, FlashErrMsg=%q, Lang=%q, Theme=%q, PocketTkn=%q, LastForceRefresh=%s, WebAuthnSession=%q`,
s.CSRF,
s.OAuth2State,
@ -40,7 +40,7 @@ func (s SessionData) String() string {
}
// Value converts the session data to JSON.
func (s SessionData) Value() (driver.Value, error) {
func (s *SessionData) Value() (driver.Value, error) {
j, err := json.Marshal(s)
return j, err
}

View file

@ -28,7 +28,7 @@ type EnclosureUpdateRequest struct {
}
// Html5MimeType will modify the actual MimeType to allow direct playback from HTML5 player for some kind of MimeType
func (e Enclosure) Html5MimeType() string {
func (e *Enclosure) Html5MimeType() string {
if e.MimeType == "video/m4v" {
return "video/x-m4v"
}