-
It all starts with https://github.com/theplant/htmlgo
- Typesafe, Compiled
- Extract a go func become a component natually
- Refactor very easy
- Looks very html
-
It's crazy that we have all these backend template languages around: go template, mustache, jinja2, Laravel Blade...
- Normally interpreted, Not type safe, error only appear on runtime
- File based, your program/parser have to know the path of these template files, enormous amout of bugs created because of this.
-
Yet another language to learn, you forgot how to use it after a few months
mkdir build
cd build
cmake ../
cmake --build . --config=Release
在build/Release生成了 chiapos.lib
和gochiapos.lib
等文件
main.go
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
VAULT_ADDR=https://vault.theplant.dev vault login -method=oidc role=staff | |
VAULT_ADDR=https://vault.theplant.dev vault write -field=signed_key ssh-client-signer/sign/dev public_key=@$HOME/.ssh/id_rsa.pub > ~/.ssh/id_rsa-cert.pub -<< EOH | |
{ | |
"valid_principals": "ubuntu,dev" | |
} | |
EOH | |
ssh-keygen -Lf ~/.ssh/id_rsa-cert.pub |
I hereby claim:
- I am sunfmin on github.
- I am sunfmin (https://keybase.io/sunfmin) on keybase.
- I have a public key ASCPdjjdDjkIUXsPKZA1OOhErY7Qj_EPZQcdPj-flYA9VAo
To claim this, I am signing this object:
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
"""Autogenerated input type of AcceptTopicSuggestion""" | |
input AcceptTopicSuggestionInput { | |
"""The Node ID of the repository.""" | |
repositoryId: ID! | |
"""The name of the suggested topic.""" | |
name: String! | |
"""A unique identifier for the client performing the mutation.""" | |
clientMutationId: String |
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 { test, assertEqual } from "https://deno.land/x/testing/mod.ts"; | |
test(function t1() { | |
assertEqual("hello", "hello"); | |
}); | |
test(function t2() { | |
assertEqual("world", "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
**/*.gohtml { | |
prep: go generate ./aigleapp | |
} | |
**/*.go { | |
prep: go install ./aigleapp | |
daemon: aigleapp | |
daemon +sighup: devd -om -n 1000 http://localhost:4000 | |
} |
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
@{ | |
var l *Locale | |
} | |
<span>@l.T("for"</span> |
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
{{func (h *HelloData) MyEmail()}} | |
<em>My Email is: {{h.Email}}</em> | |
{{end}} |
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
func Hello(w io.Writer, d *HelloData) (err error) { | |
_, err = io.WriteString(w, "<h1>") | |
if err != nil { | |
return | |
} | |
_, err = io.WriteString(w, fmt.Sprintf("Hi, %s", d.Name)) | |
if err != nil { | |
return | |
} |
NewerOlder