diff options
author | Anthony Wang | 2022-06-16 11:03:53 -0500 |
---|---|---|
committer | Anthony Wang | 2022-06-16 11:03:53 -0500 |
commit | 6602fd136ee721dee427e49faa011114cb151649 (patch) | |
tree | 3bdea7350ca7b2b4d392c4615e2df3f05364e074 | |
parent | 0c49fea641e074ab3d1b329dea6035d76d8fb174 (diff) |
Add more better comments
-rw-r--r-- | modules/activitypub/user_settings.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/activitypub/user_settings.go b/modules/activitypub/user_settings.go index a0da6f68f..2144e7b47 100644 --- a/modules/activitypub/user_settings.go +++ b/modules/activitypub/user_settings.go @@ -8,7 +8,7 @@ import ( user_model "code.gitea.io/gitea/models/user" ) -// GetKeyPair function +// GetKeyPair function returns a user's private and public keys func GetKeyPair(user *user_model.User) (pub, priv string, err error) { var settings map[string]*user_model.Setting settings, err = user_model.GetUserSettings(user.ID, []string{user_model.UserActivityPubPrivPem, user_model.UserActivityPubPubPem}) @@ -32,13 +32,13 @@ func GetKeyPair(user *user_model.User) (pub, priv string, err error) { } } -// GetPublicKey function +// GetPublicKey function returns a user's public key func GetPublicKey(user *user_model.User) (pub string, err error) { pub, _, err = GetKeyPair(user) return } -// GetPrivateKey function +// GetPrivateKey function returns a user's private key func GetPrivateKey(user *user_model.User) (priv string, err error) { _, priv, err = GetKeyPair(user) return |