Skip to content

Commit

Permalink
suspend .swp, .swo
Browse files Browse the repository at this point in the history
  • Loading branch information
ChAoSUnItY committed Mar 7, 2022
1 parent 2bcd94a commit dade87f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ main
*.dylib
*.dll
*.c
*.swp
*.swo
vls.log
24 changes: 11 additions & 13 deletions vaker/attr.v
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,19 @@ import arrays { binary_search }
type Attribute = map[string][]string

const (
builtin_attrs = [
'amount',
'amount_with_currency',
'currency',
'e164_phone_number',
'lat',
'long',
'phone_number',
'skip',
builtin_attrs = build_attrs()
)

fn build_attrs() []string {
attr_funcs := default_df.attribute_functions.keys()
builtin_attrs := [
'str_len',
'toll_free_phone_number',
'uuid_digit',
'uuid_hyphenated',
'skip',
]
)
attrs := arrays.concat(attr_funcs, builtin_attrs)
attrs.sort()
return attrs
}

// Dummy struct for get_attrs
struct Struct {
Expand Down
9 changes: 9 additions & 0 deletions vaker/data_faker.v
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,23 @@ mut:
attribute_functions map[string]fn (PtrInfo) = {
'amount': amount
'amount_with_currency': amount_with_currency
'century': century
'currency': currency
'date': date
'day_of_week': day_of_week
'e164_phone_number': e164_phone_number
'lat': latitude
'timestamp': timestamp
'long': longitude
'month': month
'period': period
'phone_number': phone_number
'timezone': timezone
'toll_free_phone_number': toll_free_phone_number
'unix_time': unix_time
'uuid_digit': digit
'uuid_hyphenated': hyphenated
'year': year
}
current_attribute_function &fn (PtrInfo) = voidptr(0)
}

0 comments on commit dade87f

Please sign in to comment.