Skip to content

Instantly share code, notes, and snippets.

Avatar

Santiago De la Cruz xhit

View GitHub Profile
@xhit
xhit / parseduration.go
Created Aug 8, 2020
Golang ParseDuration with days and weeks
View parseduration.go
package main
import (
"errors"
"fmt"
"time"
)
func main() {
dur, _ := ParseDuration("1.000000001s")
@xhit
xhit / reader.go
Last active Dec 29, 2019
Golang read csv with custom enclosure (modified reader.go in Go 1.13.5)
View reader.go
// 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 Sep 20, 2019
Examples go-simple-mail
View v2.0.0.md

Usage

package main

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