diff options
author | Runxi Yu <me@runxiyu.org> | 2025-08-17 13:52:55 +0800 |
---|---|---|
committer | Runxi Yu <me@runxiyu.org> | 2025-08-17 13:52:55 +0800 |
commit | afcf2c711b907514a91e5c4d45d2da7f118bb2b8 (patch) | |
tree | 15debbe9e2086d310a85f1929f4c580186fabec1 /forged/internal/ipc/git2c/cmd_index.go | |
parent | Linting (diff) | |
download | forge-afcf2c711b907514a91e5c4d45d2da7f118bb2b8.tar.gz forge-afcf2c711b907514a91e5c4d45d2da7f118bb2b8.tar.zst forge-afcf2c711b907514a91e5c4d45d2da7f118bb2b8.zip |
Lint ipc
Diffstat (limited to 'forged/internal/ipc/git2c/cmd_index.go')
-rw-r--r-- | forged/internal/ipc/git2c/cmd_index.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/forged/internal/ipc/git2c/cmd_index.go b/forged/internal/ipc/git2c/cmd_index.go index 8862b2c..e9fc435 100644 --- a/forged/internal/ipc/git2c/cmd_index.go +++ b/forged/internal/ipc/git2c/cmd_index.go @@ -13,10 +13,12 @@ import ( // CmdIndex requests a repository index from git2d and returns the list of commits // and the contents of a README file if available. func (c *Client) CmdIndex(repoPath string) ([]Commit, *FilenameContents, error) { - if err := c.writer.WriteData([]byte(repoPath)); err != nil { + err := c.writer.WriteData([]byte(repoPath)) + if err != nil { return nil, nil, fmt.Errorf("sending repo path failed: %w", err) } - if err := c.writer.WriteUint(1); err != nil { + err = c.writer.WriteUint(1) + if err != nil { return nil, nil, fmt.Errorf("sending command failed: %w", err) } |