mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-30 20:12:26 -05:00 
			
		
		
		
	[chore]: Bump github.com/gin-gonic/gin from 1.9.0 to 1.9.1 (#1855)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
		
					parent
					
						
							
								23705b31e4
							
						
					
				
			
			
				commit
				
					
						55aacaf4b0
					
				
			
		
					 138 changed files with 27543 additions and 25484 deletions
				
			
		
							
								
								
									
										28
									
								
								vendor/github.com/pelletier/go-toml/v2/marshaler.go
									
										
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										28
									
								
								vendor/github.com/pelletier/go-toml/v2/marshaler.go
									
										
									
										generated
									
									
										vendored
									
									
								
							|  | @ -357,9 +357,9 @@ func (enc *Encoder) encodeKv(b []byte, ctx encoderCtx, options valueOptions, v r | |||
| 
 | ||||
| 	if !ctx.inline { | ||||
| 		b = enc.encodeComment(ctx.indent, options.comment, b) | ||||
| 		b = enc.indent(ctx.indent, b) | ||||
| 	} | ||||
| 
 | ||||
| 	b = enc.indent(ctx.indent, b) | ||||
| 	b = enc.encodeKey(b, ctx.key) | ||||
| 	b = append(b, " = "...) | ||||
| 
 | ||||
|  | @ -577,11 +577,23 @@ func (enc *Encoder) encodeKey(b []byte, k string) []byte { | |||
| 	} | ||||
| } | ||||
| 
 | ||||
| func (enc *Encoder) encodeMap(b []byte, ctx encoderCtx, v reflect.Value) ([]byte, error) { | ||||
| 	if v.Type().Key().Kind() != reflect.String { | ||||
| 		return nil, fmt.Errorf("toml: type %s is not supported as a map key", v.Type().Key().Kind()) | ||||
| 	} | ||||
| func (enc *Encoder) keyToString(k reflect.Value) (string, error) { | ||||
| 	keyType := k.Type() | ||||
| 	switch { | ||||
| 	case keyType.Kind() == reflect.String: | ||||
| 		return k.String(), nil | ||||
| 
 | ||||
| 	case keyType.Implements(textMarshalerType): | ||||
| 		keyB, err := k.Interface().(encoding.TextMarshaler).MarshalText() | ||||
| 		if err != nil { | ||||
| 			return "", fmt.Errorf("toml: error marshalling key %v from text: %w", k, err) | ||||
| 		} | ||||
| 		return string(keyB), nil | ||||
| 	} | ||||
| 	return "", fmt.Errorf("toml: type %s is not supported as a map key", keyType.Kind()) | ||||
| } | ||||
| 
 | ||||
| func (enc *Encoder) encodeMap(b []byte, ctx encoderCtx, v reflect.Value) ([]byte, error) { | ||||
| 	var ( | ||||
| 		t                 table | ||||
| 		emptyValueOptions valueOptions | ||||
|  | @ -589,13 +601,17 @@ func (enc *Encoder) encodeMap(b []byte, ctx encoderCtx, v reflect.Value) ([]byte | |||
| 
 | ||||
| 	iter := v.MapRange() | ||||
| 	for iter.Next() { | ||||
| 		k := iter.Key().String() | ||||
| 		v := iter.Value() | ||||
| 
 | ||||
| 		if isNil(v) { | ||||
| 			continue | ||||
| 		} | ||||
| 
 | ||||
| 		k, err := enc.keyToString(iter.Key()) | ||||
| 		if err != nil { | ||||
| 			return nil, err | ||||
| 		} | ||||
| 
 | ||||
| 		if willConvertToTableOrArrayTable(ctx, v) { | ||||
| 			t.pushTable(k, v, emptyValueOptions) | ||||
| 		} else { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue