mirror of
				https://github.com/superseriousbusiness/gotosocial.git
				synced 2025-10-31 06:12:25 -05:00 
			
		
		
		
	[chore]: Bump github.com/gin-gonic/gin from 1.8.1 to 1.8.2 (#1286)
Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.8.1 to 1.8.2. - [Release notes](https://github.com/gin-gonic/gin/releases) - [Changelog](https://github.com/gin-gonic/gin/blob/master/CHANGELOG.md) - [Commits](https://github.com/gin-gonic/gin/compare/v1.8.1...v1.8.2) --- updated-dependencies: - dependency-name: github.com/gin-gonic/gin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> 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
					
						
							
								abd594b71f
							
						
					
				
			
			
				commit
				
					
						b966d3b157
					
				
			
		
					 45 changed files with 1196 additions and 11185 deletions
				
			
		
							
								
								
									
										71
									
								
								vendor/github.com/pelletier/go-toml/v2/unstable/builder.go
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										71
									
								
								vendor/github.com/pelletier/go-toml/v2/unstable/builder.go
									
										
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							|  | @ -0,0 +1,71 @@ | |||
| package unstable | ||||
| 
 | ||||
| // root contains a full AST. | ||||
| // | ||||
| // It is immutable once constructed with Builder. | ||||
| type root struct { | ||||
| 	nodes []Node | ||||
| } | ||||
| 
 | ||||
| // Iterator over the top level nodes. | ||||
| func (r *root) Iterator() Iterator { | ||||
| 	it := Iterator{} | ||||
| 	if len(r.nodes) > 0 { | ||||
| 		it.node = &r.nodes[0] | ||||
| 	} | ||||
| 	return it | ||||
| } | ||||
| 
 | ||||
| func (r *root) at(idx reference) *Node { | ||||
| 	return &r.nodes[idx] | ||||
| } | ||||
| 
 | ||||
| type reference int | ||||
| 
 | ||||
| const invalidReference reference = -1 | ||||
| 
 | ||||
| func (r reference) Valid() bool { | ||||
| 	return r != invalidReference | ||||
| } | ||||
| 
 | ||||
| type builder struct { | ||||
| 	tree    root | ||||
| 	lastIdx int | ||||
| } | ||||
| 
 | ||||
| func (b *builder) Tree() *root { | ||||
| 	return &b.tree | ||||
| } | ||||
| 
 | ||||
| func (b *builder) NodeAt(ref reference) *Node { | ||||
| 	return b.tree.at(ref) | ||||
| } | ||||
| 
 | ||||
| func (b *builder) Reset() { | ||||
| 	b.tree.nodes = b.tree.nodes[:0] | ||||
| 	b.lastIdx = 0 | ||||
| } | ||||
| 
 | ||||
| func (b *builder) Push(n Node) reference { | ||||
| 	b.lastIdx = len(b.tree.nodes) | ||||
| 	b.tree.nodes = append(b.tree.nodes, n) | ||||
| 	return reference(b.lastIdx) | ||||
| } | ||||
| 
 | ||||
| func (b *builder) PushAndChain(n Node) reference { | ||||
| 	newIdx := len(b.tree.nodes) | ||||
| 	b.tree.nodes = append(b.tree.nodes, n) | ||||
| 	if b.lastIdx >= 0 { | ||||
| 		b.tree.nodes[b.lastIdx].next = newIdx - b.lastIdx | ||||
| 	} | ||||
| 	b.lastIdx = newIdx | ||||
| 	return reference(b.lastIdx) | ||||
| } | ||||
| 
 | ||||
| func (b *builder) AttachChild(parent reference, child reference) { | ||||
| 	b.tree.nodes[parent].child = int(child) - int(parent) | ||||
| } | ||||
| 
 | ||||
| func (b *builder) Chain(from reference, to reference) { | ||||
| 	b.tree.nodes[from].next = int(to) - int(from) | ||||
| } | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue