Du kannst nicht mehr als 25 Themen auswählen
			Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
		
		
		
		
		
			
		
			
				
					
					
						
							33 Zeilen
						
					
					
						
							526 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							33 Zeilen
						
					
					
						
							526 B
						
					
					
				| package models | |
| 
 | |
| type Error struct { | |
| 	Status int | |
| 	Msg    string | |
| } | |
| 
 | |
| func ReurnError(status int, msg string) *Error { | |
| 	if msg == "" { | |
| 		msg = "error" | |
| 	} | |
| 	return &Error{Status: status, Msg: msg} | |
| } | |
| 
 | |
| func ReurnSuccess(msg string) *Error { | |
| 	if msg == "" { | |
| 		msg = "success" | |
| 	} | |
| 	return &Error{Status: 0, Msg: msg} | |
| } | |
| 
 | |
| type Success struct { | |
| 	Status int | |
| 	Msg    string | |
| 	Data   interface{} | |
| } | |
| 
 | |
| func ReurnData(msg string, data interface{}) *Success { | |
| 	if msg == "" { | |
| 		msg = "success" | |
| 	} | |
| 	return &Success{Status: 0, Msg: msg, Data: data} | |
| }
 | |
| 
 |