mirror of
https://github.com/vlang/v.git
synced 2025-09-15 07:22:27 +03:00
parser: check (mut f Foo)
syntax
This commit is contained in:
parent
b138cadbcb
commit
7f4cf08516
87 changed files with 492 additions and 480 deletions
|
@ -17,27 +17,27 @@ fn main() {
|
|||
vweb.run<App>(port)
|
||||
}
|
||||
|
||||
pub fn (app mut App) init() {
|
||||
pub fn (mut app App) init() {
|
||||
app.vweb.handle_static('.')
|
||||
}
|
||||
|
||||
pub fn (app mut App) json_endpoint() {
|
||||
pub fn (mut app App) json_endpoint() {
|
||||
app.vweb.json('{"a": 3}')
|
||||
}
|
||||
|
||||
pub fn (app mut App) index() {
|
||||
pub fn (mut app App) index() {
|
||||
app.cnt++
|
||||
$vweb.html()
|
||||
}
|
||||
|
||||
pub fn (app mut App) reset() {
|
||||
pub fn (mut app App) reset() {
|
||||
}
|
||||
|
||||
pub fn (app mut App) text() {
|
||||
pub fn (mut app App) text() {
|
||||
app.vweb.text('Hello world')
|
||||
}
|
||||
|
||||
pub fn (app mut App) cookie() {
|
||||
pub fn (mut app App) cookie() {
|
||||
app.vweb.set_cookie('cookie', 'test')
|
||||
app.vweb.text('Headers: $app.vweb.headers')
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue