From 5b2069c560200cc47bdffd1aac4f69c2fae4d445 Mon Sep 17 00:00:00 2001 From: despiegk Date: Sun, 30 Nov 2025 08:59:38 +0100 Subject: [PATCH] ... --- cli/compile.vsh | 3 +++ lib/apps/biz/erpnext/erpnext_actions.v | 4 +-- lib/biz/bizmodel/export.v | 8 +++--- lib/biz/bizmodel/export_csv.v | 2 +- lib/biz/bizmodel/play.v | 2 +- lib/biz/bizmodel/play_department.v | 2 +- lib/biz/bizmodel/play_hr.v | 2 +- lib/biz/bizmodel/play_pl.v | 2 +- lib/biz/bizmodel/play_product_revenue.v | 2 +- lib/biz/bizmodel/play_product_revenue_item.v | 4 +-- lib/biz/bizmodel/play_product_revenue_total.v | 6 ++--- lib/biz/spreadsheet/sheet_export_csv.v | 2 +- lib/biz/spreadsheet/sheet_getters.v | 26 +++++++++---------- lib/biz/spreadsheet/sheet_pprint.v | 4 +-- lib/clients/meilisearch/documents.v | 2 +- .../postgresql_client_model.v | 9 +++---- lib/clients/runpod/utils.v | 2 +- lib/core/herocmds/docusaurus.v | 2 +- lib/core/herocmds/git.v | 2 +- lib/core/herocmds/playbook_lib.v | 2 +- lib/core/playcmds/play_ssh.v | 2 +- lib/core/texttools/regext/regex_convert.v | 2 +- lib/data/markdown/tools/page.v | 4 +-- lib/installers/infra/livekit/livekit_model.v | 2 +- lib/installers/virt/lima/lima_actions.v | 6 ++--- lib/installers/web/traefik/traefik_actions.v | 2 +- lib/osal/systemd/systemd_process.v | 2 +- lib/schemas/jsonrpc/model_response.v | 2 +- lib/threefold/incatokens/charts.v | 2 +- lib/threefold/incatokens/vesting.v | 2 +- lib/web/docusaurus/factory.v | 2 +- lib/web/site/factory.v | 3 +-- 32 files changed, 60 insertions(+), 59 deletions(-) diff --git a/cli/compile.vsh b/cli/compile.vsh index 69b7affe..87baedcb 100755 --- a/cli/compile.vsh +++ b/cli/compile.vsh @@ -10,6 +10,7 @@ fp.version('v0.1.0') fp.description('Compile hero binary in debug or production mode') fp.skip_executable() + prod_mode := fp.bool('prod', `p`, false, 'Build production version (optimized)') help_requested := fp.bool('help', `h`, false, 'Show help message') @@ -61,6 +62,8 @@ compile_cmd := if os.user_os() == 'macos' { 'v -enable-globals -g -w -n -prod hero.v' } else { 'v -n -g -w -cg -gc none -cc tcc -d use_openssl -enable-globals hero.v' + // 'v -n -g -w -cg -gc none -cc tcc -d use_openssl -enable-globals hero.v' + // 'v -cg -enable-globals -parallel-cc -w -n -d use_openssl hero.v' } } else { if prod_mode { diff --git a/lib/apps/biz/erpnext/erpnext_actions.v b/lib/apps/biz/erpnext/erpnext_actions.v index 517ac373..35be8531 100644 --- a/lib/apps/biz/erpnext/erpnext_actions.v +++ b/lib/apps/biz/erpnext/erpnext_actions.v @@ -13,7 +13,7 @@ import incubaid.herolib.installers.lang.python import os fn startupcmd() ![]startupmanager.ZProcessNewArgs { - mut installer := get()! + _ := get()! mut res := []startupmanager.ZProcessNewArgs{} // THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED // res << startupmanager.ZProcessNewArgs{ @@ -28,7 +28,7 @@ fn startupcmd() ![]startupmanager.ZProcessNewArgs { } fn running() !bool { - mut installer := get()! + _ := get()! // THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED // this checks health of erpnext // curl http://localhost:3333/api/v1/s --oauth2-bearer 1234 works diff --git a/lib/biz/bizmodel/export.v b/lib/biz/bizmodel/export.v index 1de7a602..d19ebfda 100644 --- a/lib/biz/bizmodel/export.v +++ b/lib/biz/bizmodel/export.v @@ -16,7 +16,7 @@ pub mut: pub fn (b BizModel) export(args ExportArgs) ! { name := if args.name != '' { args.name } else { texttools.snake_case(args.title) } - path := pathlib.get_dir( + pathlib.get_dir( path: os.join_path(os.home_dir(), 'hero/var/bizmodel/exports/${name}') create: true empty: true @@ -52,7 +52,7 @@ pub fn (model BizModel) write_operational_plan(args ExportArgs) ! { mut hr_page := pathlib.get_file(path: '${hr_dir.path}/human_resources.md')! hr_page.template_write($tmpl('./templates/human_resources.md'), true)! - for key, employee in model.employees { + for _, employee in model.employees { mut employee_page := pathlib.get_file( path: '${hr_dir.path}/${texttools.snake_case(employee.name)}.md' )! @@ -73,7 +73,7 @@ pub fn (model BizModel) write_operational_plan(args ExportArgs) ! { } } - for key, department in model.departments { + for _, department in model.departments { dept := department mut dept_page := pathlib.get_file( path: '${depts_dir.path}/${texttools.snake_case(department.name)}.md' @@ -94,7 +94,7 @@ pub fn (model BizModel) write_revenue_model(args ExportArgs) ! { products_page.template_write('# Products', true)! name1 := 'example' - for key, product in model.products { + for _, product in model.products { mut product_page := pathlib.get_file( path: '${products_dir.path}/${texttools.snake_case(product.name)}.md' )! diff --git a/lib/biz/bizmodel/export_csv.v b/lib/biz/bizmodel/export_csv.v index 90598d48..83c7d040 100644 --- a/lib/biz/bizmodel/export_csv.v +++ b/lib/biz/bizmodel/export_csv.v @@ -7,7 +7,7 @@ import incubaid.herolib.core.pathlib pub struct ExportCSVArgs { pub mut: path string - include_empty bool = false // whether to include empty cells or not + include_empty bool // whether to include empty cells or not separator string = '|' // separator character for CSV } diff --git a/lib/biz/bizmodel/play.v b/lib/biz/bizmodel/play.v index 2ccc4b87..02438f05 100644 --- a/lib/biz/bizmodel/play.v +++ b/lib/biz/bizmodel/play.v @@ -22,7 +22,7 @@ pub fn play(mut plbook PlayBook) ! { }) // play actions for each biz in plbook - for biz, actions in actions_by_biz { + for biz, _ in actions_by_biz { mut model := getset(biz)! model.play(mut plbook)! } diff --git a/lib/biz/bizmodel/play_department.v b/lib/biz/bizmodel/play_department.v index b7259609..9848c3b3 100644 --- a/lib/biz/bizmodel/play_department.v +++ b/lib/biz/bizmodel/play_department.v @@ -8,7 +8,7 @@ import incubaid.herolib.core.playbook { Action } // title:'Engineering Division' // avg_monthly_cost:'6000USD' avg_indexation:'5%' fn (mut m BizModel) department_define_action(action Action) !Action { - bizname := action.params.get_default('bizname', '')! + _ := action.params.get_default('bizname', '')! mut name := action.params.get('name') or { return error('department name is required') } mut descr := action.params.get_default('descr', '')! if descr.len == 0 { diff --git a/lib/biz/bizmodel/play_hr.v b/lib/biz/bizmodel/play_hr.v index 4d0b9f9f..e2cc329a 100644 --- a/lib/biz/bizmodel/play_hr.v +++ b/lib/biz/bizmodel/play_hr.v @@ -74,7 +74,7 @@ fn (mut m BizModel) employee_define_action(action Action) !Action { mut curcost := -costpeople_row.cells[x].val mut curpeople := nrpeople_row.cells[x].val mut currev := revtotal.cells[x].val - // println("currev: ${currev}, curcost: ${curcost}, curpeople: ${curpeople}, costpercent_revenue: ${cost_percent_revenue}") + println("currev: ${currev}, curcost: ${curcost}, curpeople: ${curpeople}, costpercent_revenue: ${cost_percent_revenue}") if currev * cost_percent_revenue > curcost { costpeople_row.cells[x].val = -currev * cost_percent_revenue nrpeople_row.cells[x].val = f64(currev * cost_percent_revenue / costperson_default.usd()) diff --git a/lib/biz/bizmodel/play_pl.v b/lib/biz/bizmodel/play_pl.v index 54c7cff7..a2b29852 100644 --- a/lib/biz/bizmodel/play_pl.v +++ b/lib/biz/bizmodel/play_pl.v @@ -10,7 +10,7 @@ fn (mut sim BizModel) pl_total() ! { // sheet.pprint(nr_columns: 10)! - mut pl_total := sheet.group2row( + _ := sheet.group2row( name: 'pl_summary' include: ['pl'] tags: 'summary' diff --git a/lib/biz/bizmodel/play_product_revenue.v b/lib/biz/bizmodel/play_product_revenue.v index 59ddff42..65eaf5e5 100644 --- a/lib/biz/bizmodel/play_product_revenue.v +++ b/lib/biz/bizmodel/play_product_revenue.v @@ -77,7 +77,7 @@ fn (mut m BizModel) revenue_action(action Action) !Action { product.has_revenue = true } - mut margin := revenue.action( + _ := revenue.action( name: '${r.name}_margin' descr: 'Margin for ${r.name}' action: .substract diff --git a/lib/biz/bizmodel/play_product_revenue_item.v b/lib/biz/bizmodel/play_product_revenue_item.v index 278cf521..5f4ee3ae 100644 --- a/lib/biz/bizmodel/play_product_revenue_item.v +++ b/lib/biz/bizmodel/play_product_revenue_item.v @@ -6,7 +6,7 @@ import incubaid.herolib.core.texttools // see lib/biz/bizmodel/docs/revenue.md fn (mut m BizModel) revenue_item_action(action Action) !Action { mut r := get_action_descr(action)! - mut product := m.products[r.name] + mut product := m.products[r.name] or { return error('Product "${r.name}" not found for revenue item action') } mut nr_sold := m.sheet.row_new( name: '${r.name}_nr_sold' @@ -193,7 +193,7 @@ fn (mut m BizModel) revenue_item_action(action Action) !Action { tags: 'name:${r.name}' )! - mut margin := margin_setup.action( + _ := margin_setup.action( name: '${r.name}_margin' descr: 'Margin for ${r.name}' action: .add diff --git a/lib/biz/bizmodel/play_product_revenue_total.v b/lib/biz/bizmodel/play_product_revenue_total.v index 650db1ed..64ba4df9 100644 --- a/lib/biz/bizmodel/play_product_revenue_total.v +++ b/lib/biz/bizmodel/play_product_revenue_total.v @@ -6,19 +6,19 @@ import incubaid.herolib.core.playbook fn (mut sim BizModel) revenue_total() ! { mut sheet := sim.sheet - mut revenue_total := sheet.group2row( + _ := sheet.group2row( name: 'revenue_total' include: ['rev'] tags: 'total revtotal pl' descr: 'Revenue Total' )! - mut cogs_total := sheet.group2row( + _ := sheet.group2row( name: 'cogs_total' include: ['cogs'] tags: 'total cogstotal pl' descr: 'Cost of Goods Total.' )! - mut margin_total := sheet.group2row( + _ := sheet.group2row( name: 'margin_total' include: ['margin'] tags: 'total margintotal' diff --git a/lib/biz/spreadsheet/sheet_export_csv.v b/lib/biz/spreadsheet/sheet_export_csv.v index 5edf0d7b..ab2a9a8a 100644 --- a/lib/biz/spreadsheet/sheet_export_csv.v +++ b/lib/biz/spreadsheet/sheet_export_csv.v @@ -7,7 +7,7 @@ import incubaid.herolib.core.pathlib pub struct ExportCSVArgs { pub mut: path string - include_empty bool = false // whether to include empty cells or not + include_empty bool // whether to include empty cells or not separator string = '|' // separator character for CSV } diff --git a/lib/biz/spreadsheet/sheet_getters.v b/lib/biz/spreadsheet/sheet_getters.v index c3aeae3a..2ce2df94 100644 --- a/lib/biz/spreadsheet/sheet_getters.v +++ b/lib/biz/spreadsheet/sheet_getters.v @@ -118,23 +118,23 @@ pub fn (s Sheet) data_get_as_string(args RowGetArgs) !string { } nryears := 5 err_pre := "Can't get data for sheet:${s.name} row:${args.rowname}.\n" - mut s2 := s + mut s2 := s if args.period_type == .year { - s2 = s.toyear( - name: args.rowname - namefilter: args.namefilter - includefilter: args.includefilter - excludefilter: args.excludefilter - )! + s2 = *s.toyear( + name: args.rowname + namefilter: args.namefilter + includefilter: args.includefilter + excludefilter: args.excludefilter + )! } if args.period_type == .quarter { - s2 = s.toquarter( - name: args.rowname - namefilter: args.namefilter - includefilter: args.includefilter - excludefilter: args.excludefilter - )! + s2 = *s.toquarter( + name: args.rowname + namefilter: args.namefilter + includefilter: args.includefilter + excludefilter: args.excludefilter + )! } mut out := '' diff --git a/lib/biz/spreadsheet/sheet_pprint.v b/lib/biz/spreadsheet/sheet_pprint.v index 26739407..6127c98e 100644 --- a/lib/biz/spreadsheet/sheet_pprint.v +++ b/lib/biz/spreadsheet/sheet_pprint.v @@ -20,7 +20,7 @@ fn pad_right(s string, length int) string { pub struct PPrintArgs { pub mut: group_months int = 1 // e.g. if 2 then will group by 2 months - nr_columns int = 0 // number of columns to show in the table, 0 is all + nr_columns int // number of columns to show in the table, 0 is all description bool // show description in the table aggrtype bool = true // show aggregate type in the table tags bool = true // show tags in the table @@ -151,7 +151,7 @@ pub fn (mut s Sheet) pprint(args PPrintArgs) ! { } max_cols := data_start_index + args.nr_columns mut new_all_rows := [][]string{} - for i, row in all_rows { + for _, row in all_rows { if row.len > max_cols { new_all_rows << row[0..max_cols] } else { diff --git a/lib/clients/meilisearch/documents.v b/lib/clients/meilisearch/documents.v index 910f3589..04681fe4 100644 --- a/lib/clients/meilisearch/documents.v +++ b/lib/clients/meilisearch/documents.v @@ -228,7 +228,7 @@ pub fn (mut client MeilisearchClient) similar_documents(uid string, args Similar method: .post data: json.encode(args) } - res := client.enable_eperimental_feature(vector_store: true)! // Enable the feature first. + client.enable_eperimental_feature(vector_store: true)! // Enable the feature first. mut http := client.httpclient()! rsponse := http.post_json_str(req)! println('rsponse: ${rsponse}') diff --git a/lib/clients/postgresql_client/postgresql_client_model.v b/lib/clients/postgresql_client/postgresql_client_model.v index 99eb73df..565f809e 100644 --- a/lib/clients/postgresql_client/postgresql_client_model.v +++ b/lib/clients/postgresql_client/postgresql_client_model.v @@ -19,7 +19,7 @@ pub mut: user string = 'root' port int = 5432 host string = 'localhost' - password string = '' + password string dbname string = 'postgres' } @@ -52,8 +52,7 @@ pub fn heroscript_dumps(obj PostgresqlClient) !string { } pub fn heroscript_loads(heroscript string) !PostgresqlClient { - mut obj := encoderhero.decode[PostgresqlClient](heroscript)! - return PostgresqlClient{ - db_: pg.DB{} - } + mut client := encoderhero.decode[PostgresqlClient](heroscript)! + client.db_ = pg.DB{} + return client } diff --git a/lib/clients/runpod/utils.v b/lib/clients/runpod/utils.v index fea5b934..01209c31 100644 --- a/lib/clients/runpod/utils.v +++ b/lib/clients/runpod/utils.v @@ -114,5 +114,5 @@ fn (q QueryBuilder) build_query(args BuildQueryArgs) string { fn type_to_map[T](t T) !map[string]json2.Any { encoded_input := json2.encode(t) - return json2.raw_decode(encoded_input)!.as_map() + return json2.decode[json2.Any](encoded_input)!.as_map() } diff --git a/lib/core/herocmds/docusaurus.v b/lib/core/herocmds/docusaurus.v index 0059745d..9d8f2d63 100644 --- a/lib/core/herocmds/docusaurus.v +++ b/lib/core/herocmds/docusaurus.v @@ -114,7 +114,7 @@ fn cmd_docusaurus_execute(cmd Command) ! { // ---------- FLAGS ---------- mut open_ := cmd.flags.get_bool('open') or { false } mut buildpublish := cmd.flags.get_bool('buildpublish') or { false } - mut builddevpublish := cmd.flags.get_bool('builddevpublish') or { false } + _ := cmd.flags.get_bool('builddevpublish') or { false } mut dev := cmd.flags.get_bool('dev') or { false } mut reset := cmd.flags.get_bool('reset') or { false } mut update := cmd.flags.get_bool('update') or { false } diff --git a/lib/core/herocmds/git.v b/lib/core/herocmds/git.v index 94b6dc15..d3c8bf4a 100644 --- a/lib/core/herocmds/git.v +++ b/lib/core/herocmds/git.v @@ -217,7 +217,7 @@ fn cmd_git_execute(cmd Command) ! { mut gs := gittools.new(coderoot: coderoot)! // create the filter for doing group actions, or action on 1 repo - mut filter := '' + _ := '' mut url := '' mut path := '' diff --git a/lib/core/herocmds/playbook_lib.v b/lib/core/herocmds/playbook_lib.v index 82b44d6c..5475eb42 100644 --- a/lib/core/herocmds/playbook_lib.v +++ b/lib/core/herocmds/playbook_lib.v @@ -164,7 +164,7 @@ pub fn plbook_run(cmd Command) !(&playbook.PlayBook, string) { playbook.new(path: path)! } - dagu := cmd.flags.get_bool('dagu') or { false } + _ := cmd.flags.get_bool('dagu') or { false } playcmds.run(plbook: plbook)! diff --git a/lib/core/playcmds/play_ssh.v b/lib/core/playcmds/play_ssh.v index cae34a4a..795d570f 100644 --- a/lib/core/playcmds/play_ssh.v +++ b/lib/core/playcmds/play_ssh.v @@ -11,7 +11,7 @@ pub fn play_ssh(mut plbook PlayBook) ! { } // Get or create a single SSH agent instance - mut agent := sshagent.new_single(sshagent.SSHAgentNewArgs{})! + _ := sshagent.new_single(sshagent.SSHAgentNewArgs{})! // TO IMPLEMENT: diff --git a/lib/core/texttools/regext/regex_convert.v b/lib/core/texttools/regext/regex_convert.v index abb747f2..45c6a999 100644 --- a/lib/core/texttools/regext/regex_convert.v +++ b/lib/core/texttools/regext/regex_convert.v @@ -23,7 +23,7 @@ pub fn escape_regex_chars(s string) string { // This function does not add implicit ^ and $ anchors, allowing for substring matches. fn wildcard_to_regex(wildcard_pattern string) string { mut regex_pattern := '' - for i, r in wildcard_pattern.runes() { + for _, r in wildcard_pattern.runes() { match r { `*` { regex_pattern += '.*' diff --git a/lib/data/markdown/tools/page.v b/lib/data/markdown/tools/page.v index 21ccab64..b2bb87b8 100644 --- a/lib/data/markdown/tools/page.v +++ b/lib/data/markdown/tools/page.v @@ -38,7 +38,7 @@ pub fn set_titles(page string, maxnr int) string { for line in lines { mut hash_count := 0 mut first_char_idx := 0 - for char_idx, r in line.runes() { + for _, r in line.runes() { if r == ` ` { first_char_idx++ continue @@ -89,7 +89,7 @@ pub fn set_titles(page string, maxnr int) string { // Remove existing numbering (e.g., "1. ", "1.1. ") mut skip_chars := 0 mut in_numbering := true - for r_idx, r in original_title_text.runes() { + for _, r in original_title_text.runes() { if in_numbering { if (r >= `0` && r <= `9`) || r == `.` || r == ` ` { skip_chars++ diff --git a/lib/installers/infra/livekit/livekit_model.v b/lib/installers/infra/livekit/livekit_model.v index c97e32ab..2a637d66 100644 --- a/lib/installers/infra/livekit/livekit_model.v +++ b/lib/installers/infra/livekit/livekit_model.v @@ -17,7 +17,7 @@ pub mut: apikey string apisecret string @[secret] configpath string - nr int = 0 // each specific instance onto this server needs to have a unique nr + nr int // each specific instance onto this server needs to have a unique nr } fn obj_init(obj_ LivekitServer) !LivekitServer { diff --git a/lib/installers/virt/lima/lima_actions.v b/lib/installers/virt/lima/lima_actions.v index 182418d3..9037ba95 100644 --- a/lib/installers/virt/lima/lima_actions.v +++ b/lib/installers/virt/lima/lima_actions.v @@ -11,7 +11,7 @@ import incubaid.herolib.installers.virt.qemu import os fn startupcmd() ![]startupmanager.ZProcessNewArgs { - mut installer := get()! + _ := get()! mut res := []startupmanager.ZProcessNewArgs{} // THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED // res << startupmanager.ZProcessNewArgs{ @@ -26,7 +26,7 @@ fn startupcmd() ![]startupmanager.ZProcessNewArgs { } fn running() !bool { - mut installer := get()! + _ := get()! // THIS IS EXAMPLE CODEAND NEEDS TO BE CHANGED // this checks health of lima // curl http://localhost:3333/api/v1/s --oauth2-bearer 1234 works @@ -147,7 +147,7 @@ fn destroy() ! { lima limactl ${os.home_dir()}/bin/*.lima - ${os.home_dir()}/bin/*.lima + ${os.home_dir()}/bin/*.lima ${os.home_dir()}/share/doc/lima ${os.home_dir()}/share/lima ${os.home_dir()}/share/man/lima* diff --git a/lib/installers/web/traefik/traefik_actions.v b/lib/installers/web/traefik/traefik_actions.v index 9cac453d..3bf82b6d 100644 --- a/lib/installers/web/traefik/traefik_actions.v +++ b/lib/installers/web/traefik/traefik_actions.v @@ -9,7 +9,7 @@ import incubaid.herolib.installers.ulist import os fn startupcmd() ![]startupmanager.ZProcessNewArgs { - mut installer := get()! + _ := get()! mut res := []startupmanager.ZProcessNewArgs{} res << startupmanager.ZProcessNewArgs{ name: 'traefik' diff --git a/lib/osal/systemd/systemd_process.v b/lib/osal/systemd/systemd_process.v index ad58df30..63800e59 100644 --- a/lib/osal/systemd/systemd_process.v +++ b/lib/osal/systemd/systemd_process.v @@ -50,7 +50,7 @@ pub fn (mut self SystemdProcess) start() ! { systemctl start ${self.name} ' - job := osal.exec(cmd: cmd, stdout: false)! + osal.exec(cmd: cmd, stdout: false)! // Wait for service to start with timeout mut attempts := 0 diff --git a/lib/schemas/jsonrpc/model_response.v b/lib/schemas/jsonrpc/model_response.v index 71d4c8a2..4f636bca 100644 --- a/lib/schemas/jsonrpc/model_response.v +++ b/lib/schemas/jsonrpc/model_response.v @@ -251,7 +251,7 @@ pub fn new_response_generic[D](id int, result D) ResponseGeneric[D] { // Returns: // - A ResponseGeneric object with result of type D, or an error if parsing fails pub fn decode_response_generic[D](data string) !ResponseGeneric[D] { - raw := json2.raw_decode(data)! + raw := json2.decode[json2.Any](data)! raw_map := raw.as_map() // Validate that the response contains either result or error, but not both or neither diff --git a/lib/threefold/incatokens/charts.v b/lib/threefold/incatokens/charts.v index a15c87bd..1fc819b8 100644 --- a/lib/threefold/incatokens/charts.v +++ b/lib/threefold/incatokens/charts.v @@ -28,7 +28,7 @@ pub fn (sim Simulation) generate_market_cap_chart() !echarts.EChartsOption { curr: sim.params.simulation.currency )! - for name, scenario in sim.scenarios { + for name, _ in sim.scenarios { mut mc_row := mc_sheet.row_new( name: 'scenario_${name}_mc' tags: 'scenario:${name} type:market_cap' diff --git a/lib/threefold/incatokens/vesting.v b/lib/threefold/incatokens/vesting.v index 78b966c5..64f5b2c9 100644 --- a/lib/threefold/incatokens/vesting.v +++ b/lib/threefold/incatokens/vesting.v @@ -41,7 +41,7 @@ pub fn (mut sim Simulation) create_vesting_schedules() ! { } // Create total unlocked row - mut total_row := vesting_sheet.group2row( + _ := vesting_sheet.group2row( name: 'total_unlocked' include: ['type:vesting'] tags: 'summary type:total_vesting' diff --git a/lib/web/docusaurus/factory.v b/lib/web/docusaurus/factory.v index 3c88bf4c..73a510eb 100644 --- a/lib/web/docusaurus/factory.v +++ b/lib/web/docusaurus/factory.v @@ -15,7 +15,7 @@ pub fn dsite_define(sitename string) ! { console.print_header('Add Docusaurus Site: ${sitename}') mut c := config()! - path_publish := '${c.path_publish.path}/${sitename}' + _ := '${c.path_publish.path}/${sitename}' path_build_ := '${c.path_build.path}' // Get the site object after processing, this is the website which is a generic definition of a site diff --git a/lib/web/site/factory.v b/lib/web/site/factory.v index 62154dc6..d5e65bd6 100644 --- a/lib/web/site/factory.v +++ b/lib/web/site/factory.v @@ -37,8 +37,7 @@ pub fn get(args FactoryArgs) !&Site { pub fn exists(args FactoryArgs) bool { name := texttools.name_fix(args.name) - mut sc := sites_global[name] or { return false } - return true + return name in sites_global } pub fn default() !&Site {