Skip to content

Instantly share code, notes, and snippets.

View xhit's full-sized avatar

Santiago De la Cruz xhit

View GitHub Profile
@xhit
xhit / parseduration.go
Created August 8, 2020 05:59
Golang ParseDuration with days and weeks
package main
import (
"errors"
"fmt"
"time"
)
func main() {
dur, _ := ParseDuration("1.000000001s")
@xhit
xhit / reader.go
Last active December 29, 2019 03:49
Golang read csv with custom enclosure (modified reader.go in Go 1.13.5)
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Package csv reads and writes comma-separated values (CSV) files.
// There are many kinds of CSV files; this package supports the format
// described in RFC 4180.
//
// A csv file contains zero or more records of one or more fields per record.
// Each record is separated by the newline character. The final record may
@xhit
xhit / v2.0.0.md
Last active September 20, 2019 23:54
Examples go-simple-mail

Usage

package main

import (
	"github.com/xhit/go-simple-mail"
	"log"
)