mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-29 10:57:44 +09:00 
			
		
		
		
	upgrade to use testfixtures v3 (#11904)
* upgrade to use testfixtures v3 * simplify logic * make vendor * update per @lunny * Update templates/repo/empty.tmpl * Update templates/repo/empty.tmpl Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
		
							
								
								
									
										16
									
								
								vendor/github.com/spf13/pflag/flag.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										16
									
								
								vendor/github.com/spf13/pflag/flag.go
									
									
									
										generated
									
									
										vendored
									
									
								
							| @@ -57,9 +57,9 @@ that give one-letter shorthands for flags. You can use these by appending | ||||
| 	var ip = flag.IntP("flagname", "f", 1234, "help message") | ||||
| 	var flagvar bool | ||||
| 	func init() { | ||||
| 		flag.BoolVarP("boolname", "b", true, "help message") | ||||
| 		flag.BoolVarP(&flagvar, "boolname", "b", true, "help message") | ||||
| 	} | ||||
| 	flag.VarP(&flagVar, "varname", "v", 1234, "help message") | ||||
| 	flag.VarP(&flagval, "varname", "v", "help message") | ||||
| Shorthand letters can be used with single dashes on the command line. | ||||
| Boolean shorthand flags can be combined with other shorthand flags. | ||||
|  | ||||
| @@ -190,6 +190,18 @@ type Value interface { | ||||
| 	Type() string | ||||
| } | ||||
|  | ||||
| // SliceValue is a secondary interface to all flags which hold a list | ||||
| // of values.  This allows full control over the value of list flags, | ||||
| // and avoids complicated marshalling and unmarshalling to csv. | ||||
| type SliceValue interface { | ||||
| 	// Append adds the specified value to the end of the flag value list. | ||||
| 	Append(string) error | ||||
| 	// Replace will fully overwrite any data currently in the flag value list. | ||||
| 	Replace([]string) error | ||||
| 	// GetSlice returns the flag value list as an array of strings. | ||||
| 	GetSlice() []string | ||||
| } | ||||
|  | ||||
| // sortFlags returns the flags as a slice in lexicographical sorted order. | ||||
| func sortFlags(flags map[NormalizedName]*Flag) []*Flag { | ||||
| 	list := make(sort.StringSlice, len(flags)) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user