mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-11-03 21:12:25 -06:00 
			
		
		
		
	[chore]: Bump github.com/gin-contrib/gzip from 1.2.2 to 1.2.3 (#4000)
Bumps [github.com/gin-contrib/gzip](https://github.com/gin-contrib/gzip) from 1.2.2 to 1.2.3. - [Release notes](https://github.com/gin-contrib/gzip/releases) - [Changelog](https://github.com/gin-contrib/gzip/blob/master/.goreleaser.yaml) - [Commits](https://github.com/gin-contrib/gzip/compare/v1.2.2...v1.2.3) --- updated-dependencies: - dependency-name: github.com/gin-contrib/gzip dependency-version: 1.2.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
		
					parent
					
						
							
								c803620531
							
						
					
				
			
			
				commit
				
					
						51b9ef5c34
					
				
			
		
					 220 changed files with 127887 additions and 125516 deletions
				
			
		
							
								
								
									
										32
									
								
								vendor/github.com/bytedance/sonic/internal/optcaching/fcache.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										32
									
								
								vendor/github.com/bytedance/sonic/internal/optcaching/fcache.go
									
										
									
										generated
									
									
										vendored
									
									
								
							| 
						 | 
				
			
			@ -32,7 +32,7 @@ const _PaddingSize =  32
 | 
			
		|||
 | 
			
		||||
type FieldLookup interface {
 | 
			
		||||
	Set(fields []resolver.FieldMeta)
 | 
			
		||||
	Get(name string) int
 | 
			
		||||
	Get(name string, caseSensitive bool) int
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func isAscii(s string) bool {
 | 
			
		||||
| 
						 | 
				
			
			@ -93,13 +93,15 @@ func (self *SmallFieldMap) Set(fields []resolver.FieldMeta) {
 | 
			
		|||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (self *SmallFieldMap) Get(name string) int {
 | 
			
		||||
func (self *SmallFieldMap) Get(name string, caseSensitive bool) int {
 | 
			
		||||
	for i, k := range self.keys {
 | 
			
		||||
		if len(k) == len(name) && k == name {
 | 
			
		||||
			return i
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if caseSensitive {
 | 
			
		||||
		return -1
 | 
			
		||||
	}
 | 
			
		||||
	name = strings.ToLower(name)
 | 
			
		||||
	for i, k := range self.lowerKeys {
 | 
			
		||||
		if len(k) == len(name) && k == name {
 | 
			
		||||
| 
						 | 
				
			
			@ -153,16 +155,20 @@ const _HdrSlot = 33
 | 
			
		|||
const _HdrSize = _HdrSlot * 5
 | 
			
		||||
 | 
			
		||||
// use native SIMD to accelerate it
 | 
			
		||||
func (self *NormalFieldMap) Get(name string) int {
 | 
			
		||||
func (self *NormalFieldMap) Get(name string, caseSensitive bool) int {
 | 
			
		||||
	// small keys use native C
 | 
			
		||||
	if len(name) <= 32 {
 | 
			
		||||
		 _ = native.LookupSmallKey
 | 
			
		||||
		return native.LookupSmallKey(&name, &self.keys, self.lowOffset);
 | 
			
		||||
		_ = native.LookupSmallKey
 | 
			
		||||
		lowOffset := self.lowOffset
 | 
			
		||||
		if caseSensitive {
 | 
			
		||||
			lowOffset = -1
 | 
			
		||||
		}
 | 
			
		||||
		return native.LookupSmallKey(&name, &self.keys, lowOffset);
 | 
			
		||||
	}
 | 
			
		||||
	return self.getLongKey(name)
 | 
			
		||||
	return self.getLongKey(name, caseSensitive)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (self *NormalFieldMap) getLongKey(name string) int {
 | 
			
		||||
func (self *NormalFieldMap) getLongKey(name string, caseSensitive bool) int {
 | 
			
		||||
	for _, k := range self.longKeys {
 | 
			
		||||
		if len(k.key) != len(name) {
 | 
			
		||||
			continue;
 | 
			
		||||
| 
						 | 
				
			
			@ -172,6 +178,10 @@ func (self *NormalFieldMap) getLongKey(name string) int {
 | 
			
		|||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if caseSensitive {
 | 
			
		||||
		return -1
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	lower := strings.ToLower(name)
 | 
			
		||||
	for _, k := range self.longKeys {
 | 
			
		||||
		if len(k.key) != len(name) {
 | 
			
		||||
| 
						 | 
				
			
			@ -329,11 +339,13 @@ type FallbackFieldMap struct {
 | 
			
		|||
	 }
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
 func (self *FallbackFieldMap) Get(name string) int {
 | 
			
		||||
 func (self *FallbackFieldMap) Get(name string, caseSensitive bool) int {
 | 
			
		||||
	 if i, ok := self.inner[name]; ok {
 | 
			
		||||
		 return i
 | 
			
		||||
	 } else {
 | 
			
		||||
	 } else if !caseSensitive {
 | 
			
		||||
		 return self.getCaseInsensitive(name)
 | 
			
		||||
	 } else {
 | 
			
		||||
		return -1
 | 
			
		||||
	 }
 | 
			
		||||
 }
 | 
			
		||||
 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue