Skip to content

Commit b87a3b2

Browse files
authored
[bug]: Fix -f option (#37)
* update * update * update * [MegaLinter] Apply linters fixes --------- Co-authored-by: orangekame3 <[email protected]>
1 parent a99c1c3 commit b87a3b2

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

.ecrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"Version": "2.7.0",
32
"Verbose": false,
43
"Debug": false,
54
"IgnoreDefaults": false,

.editorconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ insert_final_newline = true
66

77
[*.md]
88
trim_trailing_whitespace = false
9-

CHANGELOG.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
# Changelog
22

33
## [v0.0.14](https://github.com/orangekame3/stree/compare/v0.0.13...v0.0.14) - 2024-07-07
4-
- [chore]: Fix version by @orangekame3 in https://github.com/orangekame3/stree/pull/35
4+
5+
- [chore]: Fix version by @orangekame3 in <https://github.com/orangekame3/stree/pull/35>
56

67
## [v0.0.13](https://github.com/orangekame3/stree/compare/v0.0.12...v0.0.13) - 2024-07-07
7-
- [feat]: add `-f` option for print full path by @orangekame3 in https://github.com/orangekame3/stree/pull/34
8+
9+
- [feat]: add `-f` option for print full path by @orangekame3 in <https://github.com/orangekame3/stree/pull/34>
810

911
## [v0.0.12](https://github.com/orangekame3/stree/compare/v0.0.11...v0.0.12) - 2023-11-18
10-
- Update README.md by @orangekame3 in https://github.com/orangekame3/stree/pull/28
11-
- Modify warning by @ddddddO in https://github.com/orangekame3/stree/pull/31
12-
- Fix region and endpoint overrides by @lusingander in https://github.com/orangekame3/stree/pull/30
12+
13+
- Update README.md by @orangekame3 in <https://github.com/orangekame3/stree/pull/28>
14+
- Modify warning by @ddddddO in <https://github.com/orangekame3/stree/pull/31>
15+
- Fix region and endpoint overrides by @lusingander in <https://github.com/orangekame3/stree/pull/30>
1316

1417
## [v0.0.11](https://github.com/orangekame3/stree/compare/v0.0.10...v0.0.11) - 2023-10-01
1518

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<img src="img/stree.png" alt="S3 directory tree visualization" height="350" width="350"/>
44

55
# 📁stree
6+
67
Directory trees of S3
78
<p align="center">
89
<a href="https://opensource.org/licenses/MIT">

pkg/tree.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ package pkg
33

44
import (
55
"fmt"
6+
"strings"
67

78
"github.com/ddddddO/gtree"
89
"github.com/fatih/color"
910
)
1011

1112
// createFullPath creates a full path for each keys
12-
func createFullPath(bucket string, keys [][]string)[][]string {
13+
func createFullPath(bucket string, keys [][]string) [][]string {
1314
for i := range keys {
14-
keys[i][len(keys[i])-1] = fmt.Sprintf("%s/%s", bucket, keys[i][len(keys[i])-1])
15+
keys[i][len(keys[i])-1] = fmt.Sprintf("%s/%s", bucket, strings.Join(keys[i], "/"))
1516
}
1617
return keys
1718
}
18-
1919
// BuildTreeWithColor builds a tree with colored nodes
2020
func BuildTreeWithColor(root *gtree.Node, bucket string, keys [][]string, f bool) *gtree.Node {
2121
if f {

0 commit comments

Comments
 (0)