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
<?php | |
// uuidv7 see https://www.rfc-editor.org/rfc/rfc9562#name-uuid-version-7 | |
function uuidv7() { | |
// current timestamp in ms | |
$timestamp = intval(microtime(true) * 1000); | |
return sprintf( | |
'%02x%02x%02x%02x-%02x%02x-%04x-%04x-%012x', | |
// first 48 bits are timestamp based |
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 ( | |
"errors" | |
"fmt" | |
"time" | |
) | |
func main() { | |
dur, _ := ParseDuration("1.000000001s") |
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
// 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 |
Usage
package main
import (
"github.com/xhit/go-simple-mail"
"log"
)