tools

module
v0.0.0-...-ceba002 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2019 License: Apache-2.0

README

tools

golang common tools

Build Status

install

go get -u github.com/wangsongyan/tools/...
date

日期相关函数

dayu

阿里大于短信发送

package main

import (
	"encoding/json"
	"log"
	"time"

	"github.com/wangsongyan/tools/dayu"
)

func main() {
	var (
		accessKeyId   = "testId"
		accessSecret  = "testSecret"
		signName      = "阿里云短信测试专用"
		phoneNumbers  = "15300000001"
		templateParam = "{\"customer\":\"test\"}"
		templateCode  = "SMS_71390007"
		format        = "JSON"
		outId         = 123
		err           error
		bodyBytes     []byte
	)
	bodyBytes, err = dayu.SendSms(accessKeyId, accessSecret, signName, phoneNumbers, templateParam, templateCode, format, outId)
	if err != nil {
		log.Println(err)
		return
	}
	log.Println(string(bodyBytes))
}
dingtalk

钉钉机器人

idcard

身份证号验证及转换

mail

smtp邮件发送

templates

字符串模板渲染

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL