Some gocoverage fixes

This commit is contained in:
Harshavardhana
2015-07-16 19:38:40 -07:00
parent 11619b779c
commit 5cb7d510e5
2 changed files with 9 additions and 9 deletions
+8 -8
View File
@@ -27,9 +27,6 @@ func (b bucketACL) isValidBucketACL() bool {
fallthrough
case b.isAuthenticated():
return true
case b.String() == "private":
// by default its "private"
return true
default:
return false
}
@@ -47,19 +44,22 @@ const (
)
func (b bucketACL) String() string {
if string(b) == "" {
if !b.isValidBucketACL() {
return string(b)
}
if b.isPrivate() {
return "private"
}
if string(b) == "readonly" {
if b.isReadOnly() {
return "public-read"
}
if string(b) == "public" {
if b.isPublic() {
return "public-read-write"
}
if string(b) == "authenticated" {
if b.isAuthenticated() {
return "authenticated-read"
}
return string(b)
return "private"
}
// IsPrivate - is acl Private
+1 -1
View File
@@ -67,7 +67,7 @@ var (
theme := GetDefaultThemeName()
// if not a TTY disable color
if !isatty(os.Stdout.Fd()) || !isatty(os.Stderr.Fd()) {
return "nocolor"
theme = "nocolor"
}
return theme
}()