- 博客(5)
- 资源 (17)
- 收藏
- 关注
原创 golang gorm 更新零值字段的方法
坑使用golang的gorm更新0值的字段,总是失败。按照官方文档,如果字段值中有0值,不能再使用 struct,而需要使用 map[string]interface{},但实际上还是失败,比对了很久,才发现是在Updates方法不能传入map的指针,必须是map的值。错误的写法values := map[string]interface{}{ "status":0, "from": hash,}err = GetDB().Model(&models.Task{Id: taskId
2021-03-23 18:42:50 6241
原创 gerrit 自动创建合并请求的脚本
git gerrit 自动创建合并请求的钩子脚本#!/bin/sh# From Gerrit Code Review 3.1.4## Part of Gerrit Code Review (https://www.gerritcodereview.com/)## Copyright (C) 2009 The Android Open Source Project## Licensed under the Apache License, Version 2.0 (the "License");
2021-03-22 13:48:28 319
原创 “Key: ‘ReqXXXXCreate.Name‘ Error:Field validation for ‘Name‘ failed on the ‘required‘ tag
报错信息golang gin框架提交数据验证,使用 gin.ShouldBind(&req) 报错如下"Key: 'ReqXXXXCreate.Name' Error:Field validation for 'Name' failed on the 'required' tag代码type ReqXXXCreate struct { Name string `json:"name" binding:"required"` // 名称}req := dto.ReqXXXCreate
2021-03-17 11:08:45 7650
原创 PHP curl 终端走代理的方法
PHP程序CURL终端走代理的方法】1、需要加一段配置,curl_setopt($ch,CURL_PROXY,'127.0.0.1:10800')2、注意走的是HTTP代理,所以V2Ray里面的inbounds需要加一段http代理,而不能用sockscurl_setopt($ch, CURLOPT_PROXY, '128.0.0.3:8080');或curl_setopt($ch, CURLOPT_PROXY, '128.0.0.3');curl_setopt($ch, CURLOPT_P
2021-03-10 17:35:00 1157
原创 使用 gerrit 替代 gitlab 仓库管理 git push
发现一个可以替代gitlab的仓库管理工具 gerrit官网网站:https://www.gerritcodereview.com/提交时候git commit -m "先提交到本地"// 再提交到远程,自动创建合并请求git push origin HEAD:refs/for/v1.0.1提交成功,会提示如下:remote: SUCCESSremote: remote: http://192.168.1.33/c/repo1/+/7358 add 重构 [NEW]remote:
2021-03-08 10:31:40 588
smartgit-win-18_1_5(2).zip
2019-07-09
支付宝充值银行前置接口(旧接口)
2014-12-30
让windows cmd支持whois查询whois.exe
2014-09-13
phpStorm 7.1运行配置包(备份)
2014-05-24
CuteFTP+8+Professional.rar 无需注册 绿色中文版
2011-10-03
PHP在线打包程序(整站打包程序) MakeZipFile.php
2011-09-28
中国 省市区三级级联菜单 数据库Mysql修正版本
2011-09-20
PHP如何匹配不包含某些关键词正则写法
2011-09-13
阿里巴巴分类信息 信息分类数据表MySQL UTF8 记录数9,553
2011-08-28
全国省市区三级sql表,可以左右连接查询,.sql文件下载
2009-11-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人