上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 64 下一页
摘要: 目前使用go 的gin 框架写了一个http portal 服务器, 1、目前为了调试方便,http服务器回报时会设置cookie 比如设置cookie:hostid=1;MD5=wewq8wqe等作为trace id 方便后续跟踪log 2、在设置cookie的时候遇到了,一些问题,比如设置coo 阅读全文
posted @ 2023-05-12 11:14 codestacklinuxer 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 在 Gin 框架中,路由器(Router)支持的 URL 模式可以使用多种符号来匹配 URL。下面是一些常用的符号及其作用: /:匹配 URL 中的 / 字符。 *:匹配 URL 中的任意字符,但不包括 /。例如,/user/*action 可以匹配 /user/add、/user/edit、/us 阅读全文
posted @ 2023-05-11 16:30 codestacklinuxer 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 绑定方法 在 Go 语言中,我们无法在结构体内定义方法,那如何给一个结构体定义方法呢,答案是可以使用组合函数的方式来定义结构体方法。它和普通函数的定义方式有些不一样,比如下面这个方法 func (person Profile) FmtProfile() { fmt.Printf("名字:%s\n", 阅读全文
posted @ 2023-05-10 19:41 codestacklinuxer 阅读(27) 评论(0) 推荐(0) 编辑
摘要: 即时求值的变量快照 使用 defer 只是延时调用函数,此时传递给函数里的变量,不应该受到后续程序的影响。 比如这边的例子 import "fmt" func main() { name := "go" defer fmt.Println(name) // 输出: go name = "python 阅读全文
posted @ 2023-05-10 19:31 codestacklinuxer 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 1. 下载并安装 gin: $ go get -u github.com/gin-gonic/gin 使用 Go modules 工具管理项目 初始化 go mod $ go mod init learninggo package main import "github.com/gin-gonic/ 阅读全文
posted @ 2023-05-05 22:34 codestacklinuxer 阅读(9) 评论(0) 推荐(0) 编辑
摘要: PAP认证 PAP协议很简单,其实就是在PPP建立过程中,PC需要将用户名和密码发送给NAS,NAS来验证用户名和密码的合法性,这个传送过程是明文传送的,这也是大家所谓的不安全,当然这部分确实是不安全的,IETF也建议不要使用PAP认证,在RFC-1334中明确了其已经被1994取代,也就是后面要讲 阅读全文
posted @ 2023-04-28 15:00 codestacklinuxer 阅读(67) 评论(0) 推荐(0) 编辑
摘要: How do I print the full value of a long string in gdb? set print elements 0 From the GDB manual: set print elements number-of-elements Set a limit on 阅读全文
posted @ 2023-04-24 19:35 codestacklinuxer 阅读(19) 评论(0) 推荐(0) 编辑
摘要: freeradius 中的conffile解析代码不错,看下! 阅读全文
posted @ 2023-04-17 23:28 codestacklinuxer 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 近期都在处理网关产品的radius mschapv2认证过程,有些东西还是记录一下吧! freeradius的架构还是相当有意思; * 每个method 都有对应的authorize 、authenticate、post_auth 等相关函数。 * 每个module 都有一个method,没有mod 阅读全文
posted @ 2023-04-17 20:58 codestacklinuxer 阅读(644) 评论(0) 推荐(0) 编辑
该文被密码保护。 阅读全文
posted @ 2023-04-09 13:42 codestacklinuxer 阅读(107) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 64 下一页