Skip to content

Instantly share code, notes, and snippets.

View gimsesu's full-sized avatar

Gim Seongsu gimsesu

View GitHub Profile
@gimsesu
gimsesu / main.go
Last active October 14, 2020 06:07
Snippet: Subtract month (golang)
package main
import (
"fmt"
"time"
)
func subtractMonth(startT time.Time, idx int) (result time.Time, err error) {
loc, err := time.LoadLocation("Asia/Seoul")
if err != nil {
@gimsesu
gimsesu / main.go
Last active October 14, 2020 06:07
Snippet: String-concatenation (Golang)
package main
import (
"fmt"
"bytes"
)
func bufString(s ...string) string {
var buf bytes.Buffer
if len(s) > 0 {