mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 01:34:27 +00: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:
		
							
								
								
									
										26
									
								
								vendor/github.com/spf13/pflag/string_array.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										26
									
								
								vendor/github.com/spf13/pflag/string_array.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -23,6 +23,32 @@ func (s *stringArrayValue) Set(val string) error {
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (s *stringArrayValue) Append(val string) error {
 | 
			
		||||
	*s.value = append(*s.value, val)
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (s *stringArrayValue) Replace(val []string) error {
 | 
			
		||||
	out := make([]string, len(val))
 | 
			
		||||
	for i, d := range val {
 | 
			
		||||
		var err error
 | 
			
		||||
		out[i] = d
 | 
			
		||||
		if err != nil {
 | 
			
		||||
			return err
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	*s.value = out
 | 
			
		||||
	return nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (s *stringArrayValue) GetSlice() []string {
 | 
			
		||||
	out := make([]string, len(*s.value))
 | 
			
		||||
	for i, d := range *s.value {
 | 
			
		||||
		out[i] = d
 | 
			
		||||
	}
 | 
			
		||||
	return out
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (s *stringArrayValue) Type() string {
 | 
			
		||||
	return "stringArray"
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user