Skip to content

Commit

Permalink
Merge pull request #15 from tamada/release/v1.1.2
Browse files Browse the repository at this point in the history
ref #13 fix again!
  • Loading branch information
tamada authored Nov 11, 2021
2 parents a02e9e0 + bfef517 commit 7da389f
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GO=go
NAME := sibling
VERSION := 1.1.1
VERSION := 1.1.2
DIST := $(NAME)-$(VERSION)

all: test build
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![Go Report Card](https://goreportcard.com/badge/github.com/tamada/sibling)](https://goreportcard.com/report/github.com/tamada/sibling)

[![License](https://img.shields.io/badge/License-WTFPL-green.svg)](https://github.com/tamada/sibling/blob/master/LICENSE)
[![Version](https://img.shields.io/badge/Version-1.1.1-green.svg)](https://github.com/tamada/sibling/releases/tag/v1.1.1)
[![Version](https://img.shields.io/badge/Version-1.1.2-green.svg)](https://github.com/tamada/sibling/releases/tag/v1.1.2)

get next/previous sibling directory name.

Expand Down
10 changes: 8 additions & 2 deletions cmd/sibling/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/tamada/sibling"
)

const VERSION = "1.1.1"
const VERSION = "1.1.2"

type options struct {
absolute bool
Expand Down Expand Up @@ -119,7 +119,7 @@ func perform(c *cobra.Command, args []string) error {
}
params := opts.buildParams(c)
c.SilenceUsage = true
for _, arg := range args {
for _, arg := range constructArgs(args) {
if len(args) > 1 {
params.printer.PrintHeader(fmt.Sprintf("===== %s =====", arg))
}
Expand All @@ -133,7 +133,13 @@ func perform(c *cobra.Command, args []string) error {
}
}
return nil
}

func constructArgs(args []string) []string {
if len(args) == 0 {
return []string{"."}
}
return args
}

func main() {
Expand Down
2 changes: 1 addition & 1 deletion docs/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ title: ":house: Home"
[![Go Report Card](https://goreportcard.com/badge/github.com/tamada/sibling)](https://goreportcard.com/report/github.com/tamada/sibling)

[![License](https://img.shields.io/badge/License-WTFPL-green.svg)](https://github.com/tamada/sibling/blob/master/LICENSE)
[![Version](https://img.shields.io/badge/Version-1.1.1-green.svg)](https://github.com/tamada/sibling/releases/tag/v1.1.1)
[![Version](https://img.shields.io/badge/Version-1.1.2-green.svg)](https://github.com/tamada/sibling/releases/tag/v1.1.2)

## :speaking_head: Description

Expand Down

0 comments on commit 7da389f

Please sign in to comment.