Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
acha-bill committed Feb 29, 2024
1 parent ca2b8d2 commit d1b386d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/bee/cmd/split.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func splitRefs(cmd *cobra.Command) {

c := &cobra.Command{
Use: "refs",
Short: "Write only the chunk referencs to the output file",
Short: "Write only the chunk reference to the output file",
RunE: func(cmd *cobra.Command, args []string) error {
inputFileName, err := cmd.Flags().GetString(optionNameInputFile)
if err != nil {
Expand Down Expand Up @@ -228,10 +228,10 @@ func splitChunks(cmd *cobra.Command) {
func writeChunkToFile(outputDir string, chunk swarm.Chunk) error {
path := filepath.Join(outputDir, chunk.Address().String())
writer, err := os.OpenFile(path, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644)
defer writer.Close()
if err != nil {
return fmt.Errorf("open output file: %w", err)
}
defer writer.Close()
_, err = writer.Write(chunk.Data())
if err != nil {
return fmt.Errorf("write chunk: %w", err)
Expand Down

0 comments on commit d1b386d

Please sign in to comment.