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/json/jsontext" | |
| "encoding/json/v2" | |
| "net/http" | |
| ) | |
| var data = map[string]string{ | |
| "status": "available", |
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
| CREATE TABLE books ( | |
| isbn char(14) NOT NULL, | |
| title varchar(255), | |
| author varchar(255), | |
| price decimal(5,2) | |
| ); | |
| INSERT INTO books (isbn, title, author, price) VALUES | |
| ('978-1503261969', 'Emma', 'Jayne Austen', 9.44), | |
| ('978-1514274873', 'Journal of a Soldier', NULL, 5.49), |
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
| . | |
| ├── cmd | |
| │ ├── cli | |
| │ └── web | |
| ├── internal | |
| │ ├── database | |
| │ ├── request | |
| │ ├── response | |
| │ ├── templatefuncs | |
| │ ├── validator |
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/json" | |
| "net/http" | |
| ) | |
| func main() {} | |
| func healthcheckHandlerEncoder(w http.ResponseWriter, r *http.Request) { |
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 ( | |
| "crypto/rand" | |
| "crypto/subtle" | |
| "encoding/base64" | |
| "errors" | |
| "fmt" | |
| "log" | |
| "strings" |
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
| . | |
| ├── books | |
| │ ├── handlers.go | |
| │ └── models.go | |
| ├── config | |
| │ └── db.go | |
| └── main.go |
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
| # Change these variables as necessary. | |
| main_package_path = ./cmd/example | |
| binary_name = example | |
| # ==================================================================================== # | |
| # HELPERS | |
| # ==================================================================================== # | |
| ## help: print this help message | |
| .PHONY: 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
| package logger | |
| import ( | |
| "fmt" | |
| "log" | |
| "os" | |
| "strings" | |
| ) | |
| type Level int |
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
| /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| Simple Password - Returns a simple pronouncable passphrase. | |
| Examples: Motir27, Wesag97, Muvak41 | |
| Rated as 'good' by http://www.passwordmeter.com/ | |
| @access public | |
| @return string | |
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ | |
| function simple_password() { |
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
| protected $authentication = 'none'; // Can be 'none', 'basic' or 'digest' | |
| protected $username = FALSE; | |
| protected $password = FALSE; | |
| protected $key = FALSE; | |
| protected $format = 'html'; | |
| protected $supported_formats = array( | |
| 'html' => 'text/html', | |
| 'php' => 'text/plain', |
NewerOlder