会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
Black
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
7
8
···
12
下一页
2021年5月24日
go 语言中的 指针
摘要: 例子1:package main import "fmt" type Student struct { Name string } func test(student *Student) { student = nil } func main() { s := &Student{Name: "zha
阅读全文
posted @ 2021-05-24 11:14 Black_Climber
阅读(115)
评论(0)
推荐(0)
2021年4月29日
redis 中 发布订阅 的 数据类型
摘要: redis 发布订阅中 给管道发送信息 结构体为 // Message represents a message notification. type Message struct { // The originating channel. Channel string // The matched
阅读全文
posted @ 2021-04-29 16:27 Black_Climber
阅读(215)
评论(0)
推荐(0)
2021年3月30日
excelExport.js 导出 excel 表格
摘要: 计两点重要的知识: 1、一个div 只能导出 一个 tables excel 2、display: none 不能被导出
阅读全文
posted @ 2021-03-30 21:53 Black_Climber
阅读(300)
评论(0)
推荐(0)
2021年3月15日
Go 出现:err is shadowed during return(err在返回过程中被隐藏)
摘要: 原因: 函数作用域问题 // 此代码为转载 代码 仅供参考func foo(x string) (ret int, err error) {//返回值列表定义了ret和err变量,作用域是整个函数体 if true {//新的语句块 ret, err := strconv.Atoi(x) //这里又
阅读全文
posted @ 2021-03-15 16:17 Black_Climber
阅读(375)
评论(0)
推荐(0)
2021年3月13日
Go 服务端 向 firebase Android 端 fcm 信息
摘要: 问题描述: 第一个问题是: json input 文件格式不正确 此问题出在,没有获取 本项目最新的 密钥json文件 路径: 进入firebase 自己的项目 -> 项目设置 -> 服务账号 -> 生成新的私钥(json文件)此json 文件用于 获取google 凭证 此凭证非 token 仅用
阅读全文
posted @ 2021-03-13 15:59 Black_Climber
阅读(930)
评论(0)
推荐(0)
2021年3月6日
Go 日志切割
摘要: 知识点: "github.com/lestrrat-go/apache-logformat" "github.com/lestrrat-go/file-rotatelogs" demo:package main import ( "log" "net/http" "time" apachelog "
阅读全文
posted @ 2021-03-06 10:54 Black_Climber
阅读(585)
评论(0)
推荐(1)
2021年3月5日
Go 文件/文件夹 监控 fsnotify
摘要: 知识点: github.com/fsnotify/fsnotify建议: 在使用 fsnotify 进行监控的 时候 监控文件夹 可以及时 将文件夹内的改变都进行监听 但是, 在监听文件的时候 只能监听 文件的 第一次更改 demo: package main; import ( "github.c
阅读全文
posted @ 2021-03-05 16:13 Black_Climber
阅读(568)
评论(0)
推荐(0)
2021年2月25日
Python logging.info(extra)
摘要: import logging FORMAT = '%(asctime)s %(clientip)s %(user)-8s %(message)s %(haiyoushui)s' logging.basicConfig(format=FORMAT) d={'clientip':'192.168.0.1
阅读全文
posted @ 2021-02-25 20:12 Black_Climber
阅读(389)
评论(0)
推荐(0)
2021年2月19日
Go jwt 验证
摘要: 设计知识点 jwt-go github.com/dgrijalva/jwt-go 代码 package main import ( "errors" "fmt" "github.com/dgrijalva/jwt-go" "time" ) const SecretKey string = "1231
阅读全文
posted @ 2021-02-19 18:39 Black_Climber
阅读(481)
评论(0)
推荐(0)
GO overseer 平滑重启
摘要: 涉及知识点: overseer: go 平滑重启库 github.com/jpillora/overseer gspt: go 设置进程名字, 方便区分不同进程 github.com/erikdubbelboer/gspt kill [参数] [进程ID] 用于向进程发送信号 例如:kill -HU
阅读全文
posted @ 2021-02-19 14:56 Black_Climber
阅读(936)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
7
8
···
12
下一页
公告