mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-11-04 00:11:04 +00:00 
			
		
		
		
	Test for empty string
This commit is contained in:
		
					parent
					
						
							
								d27cac5bae
							
						
					
				
			
			
				commit
				
					
						68cd621053
					
				
			
		
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -127,6 +127,10 @@ func removeEmptyStrings(ls []string) []string {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func ParseActorID(unvalidatedIRI, source string) (ActorID, error) {
 | 
					func ParseActorID(unvalidatedIRI, source string) (ActorID, error) {
 | 
				
			||||||
 | 
						if unvalidatedIRI == "" {
 | 
				
			||||||
 | 
							return ActorID{}, fmt.Errorf("the given IRI was empty")
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	u, err := url.Parse(unvalidatedIRI)
 | 
						u, err := url.Parse(unvalidatedIRI)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// check if userID IRI is well formed url
 | 
						// check if userID IRI is well formed url
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue