added +vet explicit-allocators to all files
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#+vet explicit-allocators
|
||||
package main
|
||||
|
||||
|
||||
import "core:fmt"
|
||||
import "core:os"
|
||||
import "core:strings"
|
||||
@@ -25,7 +25,7 @@ BLOG_BACK_MD := `
|
||||
`
|
||||
generate_blog_md_file :: proc(path: string, allocator := context.allocator) {
|
||||
|
||||
blog_list := make([dynamic]string)
|
||||
blog_list := make([dynamic]string, allocator)
|
||||
sb := strings.builder_make(allocator)
|
||||
blog_md_file := strings.builder_make(allocator)
|
||||
|
||||
@@ -34,23 +34,27 @@ generate_blog_md_file :: proc(path: string, allocator := context.allocator) {
|
||||
blog_dir := strings.to_string(sb)
|
||||
|
||||
//os.write_string(file, BLOG_START)
|
||||
blogs := walk_tree_and_get_md_names(blog_dir)
|
||||
blogs := walk_tree_and_get_md_names(blog_dir, allocator)
|
||||
|
||||
for blog in blogs {
|
||||
b := strings.split(blog, blog_dir)
|
||||
b := strings.split(blog, blog_dir, allocator)
|
||||
trim_b := strings.trim_right(b[1], ".md")
|
||||
if trim_b == "index" {continue}
|
||||
if trim_b == "index_non_blank" {continue}
|
||||
if trim_b == "test" {continue}
|
||||
if trim_b == "test_blog" {continue}
|
||||
if trim_b == "2026-03-16-Test" {continue}
|
||||
if strings.starts_with(trim_b, "!") {continue}
|
||||
append(&blog_list, blog)
|
||||
}
|
||||
|
||||
for blog_entry in blog_list {
|
||||
b := strings.split(blog_entry, blog_dir)
|
||||
b := strings.split(blog_entry, blog_dir, allocator)
|
||||
trim_b := strings.trim_right(b[1], ".md")
|
||||
strings.write_string(&blog_md_file, fmt.aprintf("* [%s](./%s.html)", trim_b, trim_b))
|
||||
strings.write_string(
|
||||
&blog_md_file,
|
||||
fmt.aprintf("* [%s](./%s.html)", trim_b, trim_b, allocator = allocator),
|
||||
)
|
||||
strings.write_string(&blog_md_file, "\n")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user