mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-22 15:27:02 +00:00
docs: Add missing docstrings, adjust wording to match standard style
This patch adds a missing docstrings for exported identifiers, and adjust some of the existing ones to match the standard style. In some cases, the identifiers were un-exported after noticing they had no external users. Besides improving documentation, it also reduces the linter noise significantly.
This commit is contained in:
@@ -72,10 +72,12 @@ func (s *Store) idToFname(id string) string {
|
||||
return s.dir + "/" + storeIDPrefix + url.QueryEscape(id)
|
||||
}
|
||||
|
||||
// Put a message into the store.
|
||||
func (s *Store) Put(id string, m proto.Message) error {
|
||||
return WriteTextMessage(s.idToFname(id), m, 0660)
|
||||
}
|
||||
|
||||
// Get a message from the store.
|
||||
func (s *Store) Get(id string, m proto.Message) (bool, error) {
|
||||
err := ReadTextMessage(s.idToFname(id), m)
|
||||
if os.IsNotExist(err) {
|
||||
@@ -84,6 +86,7 @@ func (s *Store) Get(id string, m proto.Message) (bool, error) {
|
||||
return err == nil, err
|
||||
}
|
||||
|
||||
// ListIDs in the store.
|
||||
func (s *Store) ListIDs() ([]string, error) {
|
||||
ids := []string{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user