Merge pull request #169 from mvdan/no-color

upgrade: be consistent about no colors
This commit is contained in:
Morgana 2018-02-21 02:11:26 +00:00 committed by GitHub
commit 2369f6a509
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,6 +65,9 @@ func (u upSlice) Print(start int) {
var left, right string
f := func(name string) (output string) {
if alpmConf.Options&alpm.ConfColor == 0 {
return name
}
var hash = 5381
for i := 0; i < len(name); i++ {
hash = int(name[i]) + ((hash << 5) + (hash))