- writermem: responseWriter
- Request: *http.Request
- Writer: ResponseWriter
- Params: Params
- handlers: HandlersChain
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
func convertToResult(rows *sql.Rows) (res [][]interface{}, err error) { | |
columns, err := rows.Columns() | |
if err != nil { | |
return nil, err | |
} | |
values := make([]sql.RawBytes, len(columns)) | |
args := make([]interface{}, len(values)) | |
for i := range values { |
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 | |
type A struct { | |
id string | |
name string | |
age string | |
time string | |
c00 string | |
c11 string | |
c12 string |
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" | |
"text/template" | |
// "html/template" |
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 | |
func camelCase(s string) string { | |
s = strings.TrimSpace(s) | |
buffer := make([]rune, 0, len(s)) | |
var prev rune | |
for _, curr := range s { | |
if !isDelimiter(curr) { | |
if isDelimiter(prev) || (prev == 0) { |
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" | |
"go/ast" | |
"reflect" | |
"regexp" | |
"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
package main | |
import ( | |
"io/ioutil" | |
"github.com/k0kubun/pp" | |
yaml "gopkg.in/yaml.v2" | |
) | |
type Data struct { |
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
curl ipinfo.io/ip |
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
<Card style={{ marginLeft: '64px' }}> | |
<PageHeader | |
position="static" | |
color="default" | |
> | |
<Toolbar style={{ width: '30%' }}> | |
<Typography variant="title" color="inherit" style={{ minWidth: '220px' }}> | |
</Typography> | |
<TrackingWebNew handleSubmit={handleSubmit} /> |
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
dir := "./hour=05" | |
files, err := ioutil.ReadDir(dir) | |
if err != nil { | |
panic(err) | |
} | |
var paths []string | |
for idx := range files { | |
paths = append(paths, filepath.Join(dir, files[idx].Name())) | |
} |
OlderNewer