func syncDemo() {
log.Println("start", time.Now())
var t1, t2 int
var err error
var wg sync.WaitGroup
wg.Add(2)
go func(id int, wg *sync.WaitGroup) {
defer wg.Done()
time.Sleep(3 * time.Second)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function handler() { | |
return "hello world" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axiod from "https://deno.land/x/axiod/mod.ts"; | |
export async function handler(a: int, b: int) { | |
const { data } = await axiod<{ delay: string }>( | |
"https://postman-echo.com/delay/2" | |
); | |
console.log(data); | |
return a+b; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function handler() { | |
console.log(Deno) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule CodeOnChain.HelloWorld do | |
@moduledoc """ | |
this is a hello world snippet | |
""" | |
def get_module_doc, do: @module_doc | |
def hello_world() do | |
"hello world" | |
end | |
end |