摘要: package esimport ( "context" "fmt" "github.com/olivere/elastic" "go-pkg/pkg/cfg")//可参考https://github.com/ashion89/go-pkg/tree/master/pkg/es中测试var clie 阅读全文
posted @ 2021-01-15 16:55 打工的工人 阅读(341) 评论(0) 推荐(0) 编辑
摘要: package websocketimport ( "fmt" "github.com/gin-gonic/gin" "github.com/gorilla/websocket" "github.com/unknwon/com" "net/http" "sync" "time")//启动websoc 阅读全文
posted @ 2020-12-23 11:26 打工的工人 阅读(179) 评论(0) 推荐(0) 编辑
摘要: package excelimport ( "fmt" "github.com/360EntSecGroup-Skylar/excelize" "strconv" "github.com/plandem/xlsx")/** * 导出Excel表格 * @param name {string} 导出的 阅读全文
posted @ 2020-12-23 11:18 打工的工人 阅读(291) 评论(0) 推荐(0) 编辑
摘要: 1 package http 2 3 import ( 4 "bytes" 5 "encoding/json" 6 "io/ioutil" 7 "net/http" 8 "time" 9 )10 // 复制代码即可使用 11 // 发送GET请求 12 // url: 请求地址 13 func Ge 阅读全文
posted @ 2020-12-23 11:08 打工的工人 阅读(220) 评论(0) 推荐(0) 编辑
摘要: package test import "github.com/plandem/xlsx" //学生结构体 type Stu struct { Name string Age string } //读取表中数据,返回list func RedExcel()([]Stu) { filePath :=" 阅读全文
posted @ 2020-10-11 12:12 打工的工人 阅读(1579) 评论(1) 推荐(0) 编辑
摘要: type stack struct { nums []int }// type queue struct { s1 *stack s2 *stack } //初始化栈 func newStack() *stack { return &stack{ nums: []int{}, } } //初始化队列 阅读全文
posted @ 2020-10-11 11:13 打工的工人 阅读(128) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" ) //定义栈结构 type Stack struct { StrArray []string Size int Top int } func NewStack(size int) *Stack { return &Stack{StrArray 阅读全文
posted @ 2020-10-11 10:58 打工的工人 阅读(94) 评论(0) 推荐(0) 编辑
摘要: package main import ( "fmt" ) //队列:先进先出 type Queue struct { StrArray []string Size int Pos int } func NewQueue(size int) *Queue { return &Queue{StrArr 阅读全文
posted @ 2020-10-11 10:57 打工的工人 阅读(127) 评论(0) 推荐(0) 编辑
摘要: //依赖 excel-export var nodeExcel = require('excel-export'); module.exports=async function (request, response) { var list=[{"name":"张三","age":18},{"name 阅读全文
posted @ 2020-04-17 10:12 打工的工人 阅读(348) 评论(0) 推荐(0) 编辑
摘要: 引入依赖 const xlsx=require('xlsx') 1 async function readExcel(filepath){ 2 //读取内容 3 const workbook = xlsx.readFile(filepath); 4 const sheetNames = workbo 阅读全文
posted @ 2020-04-17 09:24 打工的工人 阅读(775) 评论(0) 推荐(0) 编辑