$ go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
$ migrate -h
Usage: migrate OPTIONS COMMAND [arg...]
migrate [ -version | -help ]
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <title>Can You Lend Me?</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script> | |
| // formatNumber(n) | |
| // formats a number 1234567 to 1,234,567 |
This file contains hidden or 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
| package main | |
| import ( | |
| "cmp" | |
| "log" | |
| "math/rand" | |
| "os" | |
| "strconv" | |
| "golang.org/x/exp/slices" |
This file contains hidden or 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
| <html> | |
| <head> | |
| <script src="https://unpkg.com/htmx.org@1.8.0"></script> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <title>Template Fragment Example</title> | |
| </head> | |
| <body> | |
| <div hx-get="/notifications" hx-trigger="load" hx-swap="outerHTML"><!-- I GET REPLACED --></div> |
This file contains hidden or 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
| package main | |
| import ( | |
| "html/template" | |
| "log" | |
| "net/http" | |
| "strconv" | |
| ) | |
| /*********************** |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "regexp" | |
| "strings" | |
| ) | |
| var re *regexp.Regexp |
This file contains hidden or 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
| package main | |
| import ( | |
| "encoding/hex" | |
| "fmt" | |
| "log" | |
| "math" | |
| "strconv" | |
| "strings" | |
| "time" |
This file contains hidden or 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
| .nav { | |
| transition-duration: 1s; | |
| } |
This file contains hidden or 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
| package main | |
| import ( | |
| "fmt" | |
| "io/ioutil" | |
| "os" | |
| "strings" | |
| ) | |
| func main() { |
This file contains hidden or 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
| package {{.Package}} | |
| import ( | |
| "database/sql/driver" | |
| "encoding/json" | |
| "fmt" | |
| "strings" | |
| ) | |
| // {{.Type}}Enum is the status code of an {{.Type}} (must be int64) |