vxx2 / vlib / v / checker / tests / struct_init_field_result_err.vv
15 lines · 13 sloc · 503 bytes · 0c8ce3bcb9fd4a2e5bd5f991a5a07da976d780d7
Raw
1import time
2
3pub struct Payload {
4 iss ?string // issuer; usually the domain name of the application issuing the token
5 sub ?string // subject; usually the id of the user the token represents
6 aud ?string // audience; usually the domain name of the application that will receive the token
7 exp ?time.Time // expiration time; unix timestamp
8 iat ?time.Time // not before; unix timestamp
9 ext ?string // extra data
10}
11
12_ := Payload{
13 sub: '1234567890'
14 exp: time.parse('2019-01-01 00:00:00')
15}
16