mirror of https://github.com/linkerd/linkerd2.git
bin/fmt: Use sort -u instead of sort | uniq (#4418)
No need to pipe output to another program when the functionality exists in sort. Signed-off-by: Joakim Roubert <joakimr@axis.com>
This commit is contained in:
parent
659756e93f
commit
1e8bfed83f
2
bin/fmt
2
bin/fmt
|
@ -8,7 +8,7 @@ dirs=$(go list -f \{\{.Dir\}\} ./... | grep -v controller/gen)
|
|||
# go list will list all subdirectories and goimports acts recursively. This
|
||||
# results in certain files being reported multiple time. Therefore, we must
|
||||
# dedup them.
|
||||
files=$(bin/goimports -l $dirs | sort | uniq)
|
||||
files=$(bin/goimports -l $dirs | sort -u)
|
||||
|
||||
if [ -n "$files" ]; then
|
||||
for file in $files; do
|
||||
|
|
Loading…
Reference in New Issue