Files
seaweedfs/weed/shell/command_s3_helpers.go
T
Chris Lu 99cf9fadca shell: address review feedback for s3.iam.*, s3.config.show, s3.user.provision
- Simplify joinMax using strings.Join
- Fix rolePolicies: remove s3:ListBucket from object-level actions
  (already covered by bucket-level statement)
- Fix admin role: grant s3:* on bucket resource too
- Return flag parse errors instead of swallowing them
2026-04-07 12:24:00 -07:00

12 lines
269 B
Go

package shell
import "strings"
// joinMax joins up to max strings with ", " and appends "..." if truncated.
func joinMax(items []string, max int) string {
if len(items) <= max {
return strings.Join(items, ", ")
}
return strings.Join(items[:max], ", ") + "..."
}