Skip to content

Instantly share code, notes, and snippets.

@fzdwx
fzdwx / ctx.go
Created December 3, 2022 06:02
go ctx react impl
func resSearch(ctx context.Context, hostname string, rtype, class int) ([]dnsmessage.Resource, error) {
if ctx.Done() == nil {
return cgoResSearch(hostname, rtype, class)
}
type result struct {
err error
res []dnsmessage.Resource
}
package main
import (
"fmt"
"sync"
)
func main() {
for n := 0; n < 10; n++ {
var (
@fzdwx
fzdwx / filename
Last active December 30, 2023 14:13
filename
我草暗示大三大四
爱仕达受到
爱仕达受到
暗示大三大四的
/*
mysql
drop table if exists file;
create table file
(
id bigint primary key,
name varchar(200),
parent_id bigint,
is_dir bigint,
@fzdwx
fzdwx / README
Last active February 27, 2024 01:36
Hi