Go Core - List + Ring
|Word Count:0|Reading Time:1mins
Author: zhongmingmao
Copyright Notice: All articles on this blog are licensed under CC BY-NC-SA 4.0 unless otherwise stated.
Related Articles

2022-05-15
Go Core - Array + Slice

2022-05-15
Go Core - Entity

2022-02-04
Cloud Native Foundation - Go Features
特点 可以高效编译、支持高并发、面向垃圾回收 秒级完成大型程序的单节点编译 依赖管理清晰 不支持继承 支持垃圾回收、支持并发执行、支持多线程通讯 对多核计算机支持友好 特性来源 环境变量 Env Desc Value GOARCH The architecture, or processor, for which to compile code. amd64 GOBIN The directory where ‘go install’ will install a command. GOCACHE The directory where the go command will store cached information for reuse in future builds. ~/Library/Caches/go-build GOMODCACHE The directory where the go command will store downloaded modules. ~/go/pkg/mod ...

2022-10-08
Cloud Native Foundation - Go Scheduling
线程加锁 线程安全 123456789// fatal error: concurrent map writesfunc unsafeWrite() { conflictMap := map[int]int{} for i := 0; i < 1<<10; i++ { go func(i int) { conflictMap[0] = i }(i) }} 锁 Go 不仅支持基于 CSP 的通信模型,也支持基于共享内存的多线程数据访问 Sync 包提供了锁的基本原语 原语 描述 sync.Mutex 互斥锁 sync.RWMutex 读写分离锁 sync.WaitGroup 等待一组 goroutine 返回 sync.Once 保证某段代码只执行 1 次 sync.Cond 让一组 goroutine 在满足特定条件时被唤醒 Mutex12345678910111213141516171819...

2022-04-30
Go Engineering - Foundation - RD
功能需求 为 iamctl 新增 helloworld 命令,该命令向终端打印 hello world 开发阶段代码开发 选择 Git Flow:适用于大型非开源项目 创建分支 基于 develop 分支,新建一个功能分支 feature/helloworld 1$ git checkout -b feature/helloworld develop branch 名要符合 Git Flow 的分支命名规范,会通过 pre-commit 的 githook 来确保分支名符合规范 123$ md5 ./githooks/pre-commit ./.git/hooks/pre-commitMD5 (./githooks/pre-commit) = 3324d20a738461f3b6347f9ce7dae6b6MD5 (./.git/hooks/pre-commit) = 3324d20a738461f3b6347f9ce7dae6b6 ./.git/hooks/pre-commit123456789101112131415161718#!/usr/bin/env bashLC_A...

2022-03-27
Go Engineering - Specification - Life Cycle
生命周期管理 研发模式瀑布模式 按照预先规划好的研发阶段来推进研发进度,串行执行(在每个阶段完美完成后,才会进入到下一阶段) 迭代模式 研发任务被切成一系列轮次,每一个轮次是一个迭代,每一次迭代都是从设计到实现的完整过程 不要求每个阶段的任务都做到最完美,先把主要功能搭建起来,然后再通过客户的反馈信息不断完善 缺点:比较专注于开发过程,很少从项目管理的视角去加速和优化项目开发过程 敏捷模式 将一个大的需求分成多个、可分阶段完成的小迭代,在开发过程中,软件一直处于可用状态! 敏捷模式需要高频地开发、构建、测试、发布和部署,进而催生了 CICD 技术 CICD CICD 通过自动化的手段,快速执行代码检查、测试、构建、部署等任务,解决敏捷模式带来的弊端 CI:Continuous Integration 频繁地将开发者的代码合并到主干上 流程 开发人员完成代码开发,push 到 git 仓库 CI 工具对代码进行扫描、单元测试和构建,并将结果反馈给开发者 CI 通过后会将代码合并到主干 CI 可以让问题在开发阶段暴露,CI 执行很频繁,需要自动化工具支撑 CD:Continuous ...
Announcement
Things are always unexpected!





