go每日一库之26 jj

Go 常用命令介绍

Go 常用命令 目录Go 常用命令一、Go 常用命令1.1 go build1.1.1 指定输出目录1.1.2 常用环境变量设置编译操作系统和 CPU 架构1.1.3 查看支持的操作系统和CPU架构1.2 go test1.3 go vet1.4 go clean1.5 go fmt1.6 go g ......
命令 常用 Go

Go 语言开发环境搭建

Go 语言开发环境搭建 目录Go 语言开发环境搭建一. GO 环境安装1.1 下载1.2 Go 版本的选择1.3 安装1.3.1 Windows安装1.3.2 Linux下安装1.3.2 Mac下安装1.4 验证Go安装二. Go 语言环境变量2,1 查看Go 环境变量2.2 常用Go 配置项2.3 ......
语言 环境 Go

第一个 Go 程序"hello,world" 与 main 函数和Go常用基本命令

第一个 Go 程序"hello,world" 与 main 函数和Go常用基本命令 目录第一个 Go 程序"hello,world" 与 main 函数和Go常用基本命令一.创建“hello,world”示例程序二. “hello,world” 程序结构拆解三、main 函数四、Go 语言中程序是怎 ......
quot 函数 命令 常用 程序

Go 多版本管理工具

Go 多版本管理工具 目录Go 多版本管理工具一、go get 命令1.1 使用方法:二、Goenv三、GVM (Go Version Manager)四、voidint/g4.1 安装4.2 冲突4.3 使用 在平时开发中,本地新旧项目并行开发的过程中,你大概率会遇到一个令人头疼的问题,如何同时使 ......
管理工具 版本 工具 Go

Go 语言的前生今世与介绍

Go 语言的前生今世与介绍 目录Go 语言的前生今世与介绍一. Go 语言的发展1.1 Go 语言是如何诞生的?1.2 Go语言的早期团队和演进历程1.3 Go语言正式发布并开源1.4 Go 语言的版本发展历史二. GO语言介绍2.0 Go 语言原则2.1 为什么需要 Go 语言?2.2 Go 设计 ......
前生 语言 Go

10.07每日总结

启动mongodb bin/mongod -f single/mongod.conf 需要在mongodb路径下 连接 bin/mongo --host=192.168.88.151 需要在mongodb路径下 关闭服务 客户端登录服务,注意,这里通过localhost登录,如果需要远程登录,必须先 ......
10.07 10 07

大三每日总结

软考相关笔记 ......

Go - Composing Structs from Other Structs

Problem: You want a struct that has data and methods of another struct. Solution: Embed an unnamed struct within another struct. The outer struct will ......
Structs Composing Other from Go

Go - Creating One - Time Structs

person := struct { Id int Name string Email string }{ 1 , "Chang Sau Sheong" , "sausheong@email.com" } person = struct { Id int Name string Email stri ......
Creating Structs Time One Go

2023-10-07:用go语言,给定n个二维坐标,表示在二维平面的n个点, 坐标为double类型,精度最多小数点后两位, 希望在二维平面上画一个圆,圈住其中的k个点,其他的n-k个点都要在圆外。

2023-10-07:用go语言,给定n个二维坐标,表示在二维平面的n个点, 坐标为double类型,精度最多小数点后两位, 希望在二维平面上画一个圆,圈住其中的k个点,其他的n-k个点都要在圆外。 返回一个圆心和半径,表示哪个圆可以圈住其中的k个点。 坐标和半径都是double类型,最多保留小数点 ......
坐标 小数点 小数 精度 平面

Go - Creating Struct Instances

Problem: You want to create an instance of a struct. Solution: Create a struct instance directly using the name of the struct, or a pointer to a struc ......
Instances Creating Struct Go

每日一库:cobra 简介

当你需要为你的 Go 项目创建一个强大的命令行工具时,你可能会遇到许多挑战,比如如何定义命令、标志和参数,如何生成详细的帮助文档,如何支持子命令等等。为了解决这些问题,github.com/spf13/cobra 就可以派上用场。 github.com/spf13/cobra 是一个用于构建强大的命 ......
简介 cobra

go.搭建简单Gin项目

新建gin_demo project 获取gin框架: go get -u github.com/gin-gonic/gin 建一个main方法 package main import "github.com/gin-gonic/gin" import _ "net/http" func main( ......
项目 Gin go

2023.10.6——每日总结

学习所花时间(包括上课):0h 代码量(行):0行 博客量(篇):1篇 今天,上午学习+休息,下午学习+休息; 我了解到的知识点: 1.任务 明日计划: 学习+休息 ......
2023 10

每日总结

今日收获 回学校啦!!! 今天背了好多的单词,准备了部分的软考; 还解决了一些有关于springboot和数据库的“恩怨情仇”; 不得不感叹一句,软考的题目真的好广泛啊😱 明天预计 希望!!!考试顺利!!!(x3) 然后,继续准备之后的考试啥的; 绝了,明天居然没有王老师的测试,没关系,就相当于提 ......

CAD每日练习1

1 实战案例 2 关键操作 A(ARC)圆弧命令 TK/TT 临时追踪命令,可以创建临时参考点 https://baijiahao.baidu.com/s?id=1771295873341689049&wfr=spider&for=pc tk:类似极轴追踪,竖直和水平方向追踪 tt: 参考点追踪 o ......
CAD

超能组合:python 的开发效率 + go 的并发 + shell 的短小精悍

工具思维:利用合适的工具做合适的事情,然后合理地加以组合。 在”谈谈程序员应当具备的技术思维“一文中谈到了工具思维。本文对工具思维作一发挥运用。 批量下载图片 程序员总是有点”美图“爱好的。由于程序员通常又是比较”懒惰“的(可没有那个耐心和体力去一页页点开再点击按钮),那么,就会想到用程序来自动化拉 ......
短小精悍 超能 效率 python shell

Go - Parsing Time Displays Into Structs

func main () { str := "4:31am +0800 on Oct 1, 2021" layout := "3:04pm - 0700 on Jan 2, 2006" t , err := time . Parse ( layout , str ) if err != nil { ......
Displays Parsing Structs Into Time

Go - Formatting time

func main () { t := time . Now () fmt . Println ( t . Format ( "3:04PM" )) fmt . Println ( t . Format ( "Jan 02, 2006" )) } When you run this you shou ......
Formatting time Go

Go - Measuring Lapsed Time

Problem: You want to measure the lapsed time and make sure that it is accurate. Solution: Use the monotonic clock in the Time struct to find the lapse ......
Measuring Lapsed Time Go

2023.10.5——每日总结

学习所花时间(包括上课):0h 代码量(行):0行 博客量(篇):1篇 今天,上午学习+休息,下午学习+休息; 我了解到的知识点: 1. Maven; 2. Spring Boot; 明日计划: 学习+休息 ......
2023 10

go语言ent教程:使用zerolog定制ent日志

背景:ent开始debug模式后,可以输出日志,但是我们想为ent接入zerolog,该怎么做呢? 一、引入zerolog go get -u github.com/rs/zerolog 二、自定义zerolog配置 customLog := func(args ...any) { str := f ......
ent zerolog 语言 教程 日志

go语言ent教程:开启debug调试模式

背景:ent模式是没有开启debug模式的 开启ent的调试模式有2种方法: 一、通过配置选项开启 client, err := ent.Open("mysql", "root:dev@123456@tcp(localhost:3306)/test?parseTime=True", ent.Debu ......
语言 模式 教程 debug ent

每日总结

今日收获 背了单词!! 学习了MapReduce的相关知识; 明天预计 好吧,由于特殊情况,回校时间推迟到了明天上午; 回校之后就再准备准备王老师的考试,尊的害怕~ 背单词!!! 准备顺利! ......

Go - Representing Duration

Problem: You want to specify a duration of time. Solution: Use the Duration type to represent a span of time. The main representation for a span of ti ......
Representing Duration Go

Go - Representing Time Zones

Problem: You want to include the time zone information in a Time struct. Solution: The Time struct includes a Location , which is the representation o ......
Representing Zones Time Go

vue-router.esm.js:2065 Uncaught (in promise) Error: Redirected when going from "/login?redirect=%2Fhome" to "/home" via a navigation guard.

原因: vue-router路由版本更新产生的问题,导致路由跳转失败抛出该错误; 真正的原因是由于返回了一个Promise对象, 正常的跳转由then方法执行 当正常的路由跳转, 被"路由导航守卫"拦截并重新指定路由时, 由于 this.$router.push() 返回的是Promise对象, 此 ......

每日总结

springboot项目之java.lang.NullPointerException: null问题 今天再弄项目的时候出现了这个问题 springboot项目报错2023-10-05 10:33:01.022 ERROR 22472 [nio-8080-exec-3] o.a.c.c.C.[.[ ......

kubelet.go 2466 Error getting node not found

kubeadm初始化kubernetes集群报错,kubelet服务提示:kubelet.go:2466] "Error getting node" err="node \"k8s3-master\" not found处理记录。 0. ENV kubernetes 1.22.x/1.23.x/1. ......
kubelet getting Error found 2466

Go - Decoding Data with a Customized Binary Format to Structs

Problem: You want to decode the customized binary format back to structs. Solution: Use the encoding/binary package to take data from the binary forma ......
Customized Decoding Structs Binary Format