[#XX] types: Refactor imported SDK and API types
Some checks failed
ci/woodpecker/pr/pre-commit Pipeline was successful
Build / Build Components (1.19) (pull_request) Successful in 2m45s
Build / Build Components (1.20) (pull_request) Successful in 8m1s
Tests and linters / Tests (1.19) (pull_request) Failing after 3m0s
Tests and linters / Tests (1.20) (pull_request) Failing after 3m20s
Tests and linters / Lint (pull_request) Failing after 9m45s
Tests and linters / Tests with -race (pull_request) Failing after 4m38s
Tests and linters / Staticcheck (pull_request) Failing after 9m4s
Some checks failed
ci/woodpecker/pr/pre-commit Pipeline was successful
Build / Build Components (1.19) (pull_request) Successful in 2m45s
Build / Build Components (1.20) (pull_request) Successful in 8m1s
Tests and linters / Tests (1.19) (pull_request) Failing after 3m0s
Tests and linters / Tests (1.20) (pull_request) Failing after 3m20s
Tests and linters / Lint (pull_request) Failing after 9m45s
Tests and linters / Tests with -race (pull_request) Failing after 4m38s
Tests and linters / Staticcheck (pull_request) Failing after 9m4s
Signed-off-by: Airat Arifullin a.arifullin@yadro.com
This commit is contained in:
parent
a65e26878b
commit
4cb9488a4a
188 changed files with 2282 additions and 1321 deletions
|
@ -50,16 +50,16 @@ func (c *Config) NeedsCompression(obj *objectSDK.Object) bool {
|
|||
}
|
||||
|
||||
for _, attr := range obj.Attributes() {
|
||||
if attr.Key() == objectSDK.AttributeContentType {
|
||||
if attr.GetKey() == objectSDK.AttributeContentType {
|
||||
for _, value := range c.UncompressableContentTypes {
|
||||
match := false
|
||||
switch {
|
||||
case len(value) > 0 && value[len(value)-1] == '*':
|
||||
match = strings.HasPrefix(attr.Value(), value[:len(value)-1])
|
||||
match = strings.HasPrefix(attr.GetValue(), value[:len(value)-1])
|
||||
case len(value) > 0 && value[0] == '*':
|
||||
match = strings.HasSuffix(attr.Value(), value[1:])
|
||||
match = strings.HasSuffix(attr.GetValue(), value[1:])
|
||||
default:
|
||||
match = attr.Value() == value
|
||||
match = attr.GetValue() == value
|
||||
}
|
||||
if match {
|
||||
return false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue