mirror of
				https://gitea.com/gitea/tea.git
				synced 2025-10-31 01:05:26 +01:00 
			
		
		
		
	Update dependencies (#316)
update xdg update survey update go-sdk Co-authored-by: Norwin Roosen <git@nroo.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/316 Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com> Reviewed-by: 6543 <6543@obermui.de> Co-Authored-By: Norwin <noerw@noreply.gitea.io> Co-Committed-By: Norwin <noerw@noreply.gitea.io>
This commit is contained in:
		
							
								
								
									
										2
									
								
								vendor/github.com/AlecAivazis/survey/v2/go.mod
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								vendor/github.com/AlecAivazis/survey/v2/go.mod
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -5,7 +5,7 @@ require ( | ||||
| 	github.com/davecgh/go-spew v1.1.1 // indirect | ||||
| 	github.com/hinshun/vt10x v0.0.0-20180616224451-1954e6464174 | ||||
| 	github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 | ||||
| 	github.com/kr/pty v1.1.4 // indirect | ||||
| 	github.com/kr/pty v1.1.4 | ||||
| 	github.com/mattn/go-colorable v0.1.2 // indirect | ||||
| 	github.com/mattn/go-isatty v0.0.8 | ||||
| 	github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b | ||||
|   | ||||
							
								
								
									
										9
									
								
								vendor/github.com/AlecAivazis/survey/v2/input.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								vendor/github.com/AlecAivazis/survey/v2/input.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -190,13 +190,20 @@ func (i *Input) Prompt(config *PromptConfig) (interface{}, error) { | ||||
| } | ||||
|  | ||||
| func (i *Input) Cleanup(config *PromptConfig, val interface{}) error { | ||||
| 	// use the default answer when cleaning up the prompt if necessary | ||||
| 	ans := i.answer | ||||
| 	if ans == "" && i.Default != "" { | ||||
| 		ans = i.Default | ||||
| 	} | ||||
|  | ||||
| 	// render the cleanup | ||||
| 	return i.Render( | ||||
| 		InputQuestionTemplate, | ||||
| 		InputTemplateData{ | ||||
| 			Input:      *i, | ||||
| 			ShowAnswer: true, | ||||
| 			Config:     config, | ||||
| 			Answer:     i.answer, | ||||
| 			Answer:     ans, | ||||
| 		}, | ||||
| 	) | ||||
| } | ||||
|   | ||||
							
								
								
									
										5
									
								
								vendor/github.com/AlecAivazis/survey/v2/multiselect.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								vendor/github.com/AlecAivazis/survey/v2/multiselect.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -273,7 +273,10 @@ func (m *MultiSelect) Prompt(config *PromptConfig) (interface{}, error) { | ||||
|  | ||||
| 	// start waiting for input | ||||
| 	for { | ||||
| 		r, _, _ := rr.ReadRune() | ||||
| 		r, _, err := rr.ReadRune() | ||||
| 		if err != nil { | ||||
| 			return "", err | ||||
| 		} | ||||
| 		if r == '\r' || r == '\n' { | ||||
| 			break | ||||
| 		} | ||||
|   | ||||
							
								
								
									
										11
									
								
								vendor/github.com/AlecAivazis/survey/v2/renderer.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								vendor/github.com/AlecAivazis/survey/v2/renderer.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -148,8 +148,15 @@ func (r *Renderer) countLines(buf bytes.Buffer) int { | ||||
| 			delim = len(bufBytes) // no new line found, read rest of text | ||||
| 		} | ||||
|  | ||||
| 		// account for word wrapping | ||||
| 		count += int(utf8.RuneCount(bufBytes[curr:delim]) / w) | ||||
| 		if lineWidth := utf8.RuneCount(bufBytes[curr:delim]); lineWidth > w { | ||||
| 			// account for word wrapping | ||||
| 			count += lineWidth / w | ||||
| 			if (lineWidth % w) == 0 { | ||||
| 				// content whose width is exactly a multiplier of available width should not | ||||
| 				// count as having wrapped on the last line | ||||
| 				count -= 1 | ||||
| 			} | ||||
| 		} | ||||
| 		curr = delim + 1 | ||||
| 	} | ||||
|  | ||||
|   | ||||
							
								
								
									
										4
									
								
								vendor/github.com/AlecAivazis/survey/v2/terminal/cursor.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								vendor/github.com/AlecAivazis/survey/v2/terminal/cursor.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -42,12 +42,12 @@ func (c *Cursor) Back(n int) { | ||||
|  | ||||
| // NextLine moves cursor to beginning of the line n lines down. | ||||
| func (c *Cursor) NextLine(n int) { | ||||
| 	fmt.Fprintf(c.Out, "\x1b[%dE", n) | ||||
| 	c.Down(1) | ||||
| } | ||||
|  | ||||
| // PreviousLine moves cursor to beginning of the line n lines up. | ||||
| func (c *Cursor) PreviousLine(n int) { | ||||
| 	fmt.Fprintf(c.Out, "\x1b[%dF", n) | ||||
| 	c.Up(1) | ||||
| } | ||||
|  | ||||
| // HorizontalAbsolute moves cursor horizontally to x. | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Norwin
					Norwin