Skip to content

Instantly share code, notes, and snippets.

View locona's full-sized avatar
:octocat:
On vacation

Miyamae Yuuya locona

:octocat:
On vacation
View GitHub Profile
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) {
package main
import (
"fmt"
"io/ioutil"
"os"
"strings"
"text/template"
// "html/template"
@locona
locona / dummy.go
Last active May 17, 2018 02:26
dummy data of csv format
package main
type A struct {
id string
name string
age string
time string
c00 string
c11 string
c12 string
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 {
@locona
locona / context.md
Last active May 10, 2017 03:50
Gin読書会

Gin 読書会

Context

  • writermem: responseWriter
  • Request: *http.Request
  • Writer: ResponseWriter
  • Params: Params
  • handlers: HandlersChain