Published on2019年6月17日go showapi.com接口Go介绍 go showapi.com 接口,用 go 封装其提供的三个接口,获取组装后的 url、http 请求返回字符串及 json。给出示例代码,如获取文本笑话的用法。
Published on2019年6月15日go http get post jsonGo本文介绍 go 中 get 和 post 请求的 json 格式封装。get 用 HttpGetJson 函数,post 较复杂用 HttpPostJson 函数,都通过 marshal 处理数据,用法举例清晰,注意 resp 为根据 json 应答定义的 struct 。
Published on2019年6月12日corosync + pacemaker高可用部署Linux本文介绍了 corosync + pacemaker 高可用部署,包括两者简介、基础环境准备(主机名设置、防火墙关闭等)、集群部署(安装相关软件、修改配置文件等)及 CRM 配置(增加虚拟 IP 资源、服务资源及分组等),通过这些步骤可实现高可用服务。
Published on2019年6月11日linux 解压缩(.tar .tar.gz .gz .rar .zip)Linux文章介绍 linux 解压缩(.tar.tgz.gz.rar.zip),给出 tar 命令及参数,如 -c 建包、-x 解压等,还列举多种压缩格式(如 tar、gz、bz2 等)及相应解压命令,方便用户在 linux 系统中进行文件压缩解压操作。
Published on2019年6月8日go 第三方github登录Go文章介绍了 go 第三方 github 登录的实现步骤。先在 github 新建 oauth app 获相关信息,通过 html 标签和路由实现点击 github 登录,再处理 github 登录成功后的回调,获取 access token 及用户信息,判断并处理用户,将 token 保存在 session 中,还定义了 github 返回的 json 应答结构体。