vweb: default init methods (#7779)
							parent
							
								
									e237df3c1c
								
							
						
					
					
						commit
						ac22fe998a
					
				| 
						 | 
					@ -448,7 +448,8 @@ fn (mut g Gen) method_call(node ast.CallExpr) {
 | 
				
			||||||
		if !is_range_slice {
 | 
							if !is_range_slice {
 | 
				
			||||||
			g.write('&')
 | 
								g.write('&')
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	} else if !node.receiver_type.is_ptr() && node.left_type.is_ptr() && node.name != 'str' {
 | 
						} else if !node.receiver_type.is_ptr() && node.left_type.is_ptr() && node.name != 'str' &&
 | 
				
			||||||
 | 
							node.from_embed_type == 0 {
 | 
				
			||||||
		g.write('/*rec*/*')
 | 
							g.write('/*rec*/*')
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if node.free_receiver && !g.inside_lambda && !g.is_builtin_mod {
 | 
						if node.free_receiver && !g.inside_lambda && !g.is_builtin_mod {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -58,6 +58,12 @@ pub mut:
 | 
				
			||||||
	form_error        string
 | 
						form_error        string
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// declaring init_once in your App struct is optional
 | 
				
			||||||
 | 
					pub fn (ctx Context) init_once() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// declaring init in your App struct is optional
 | 
				
			||||||
 | 
					pub fn (ctx Context) init() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pub struct Cookie {
 | 
					pub struct Cookie {
 | 
				
			||||||
	name      string
 | 
						name      string
 | 
				
			||||||
	value     string
 | 
						value     string
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue