format sourcecode with gofmt

This commit is contained in:
Bernhard B 2025-06-03 22:19:22 +02:00
parent b3a6ee1e5d
commit fb6ec6013b
2 changed files with 53 additions and 54 deletions

View File

@ -1311,7 +1311,7 @@ func (s *SignalClient) GetGroupAvatar(number string, groupId string) ([]byte, er
rawData, err = jsonRpc2Client.getRaw("getAvatar", &number, request)
if err != nil {
if err.Error() == "Could not find avatar" {
return []byte{},&NotFoundError{Description: "No avatar found."}
return []byte{}, &NotFoundError{Description: "No avatar found."}
}
return []byte{}, err
}
@ -1480,7 +1480,7 @@ func (s *SignalClient) GetAccounts() ([]string, error) {
func (s *SignalClient) GetAttachments() ([]string, error) {
files := []string{}
attachmentsPath := s.signalCliConfig+"/attachments/"
attachmentsPath := s.signalCliConfig + "/attachments/"
if _, err := os.Stat(attachmentsPath); !os.IsNotExist(err) {
err = filepath.Walk(attachmentsPath, func(path string, info os.FileInfo, err error) error {
if info.IsDir() {
@ -2456,7 +2456,7 @@ func (s *SignalClient) ListContacts(number string) ([]ListContactsResponse, erro
return resp, nil
}
func (s *SignalClient) SetPin(number string, registrationLockPin string) (error) {
func (s *SignalClient) SetPin(number string, registrationLockPin string) error {
if s.signalCliMode == JsonRpc {
type Request struct {
RegistrationLockPin string `json:"pin"`
@ -2481,8 +2481,7 @@ func (s *SignalClient) SetPin(number string, registrationLockPin string) (error)
return nil
}
func (s *SignalClient) RemovePin(number string) (error) {
func (s *SignalClient) RemovePin(number string) error {
if s.signalCliMode == JsonRpc {
jsonRpc2Client, err := s.getJsonRpc2Client()
if err != nil {