1 时序图
0 标准实例12345678910@startuml用户 -> 认证中心: 登录操作认证中心 -> 缓存: 存放(key=token+ip,value=token)token用户 <- 认证中心 : 认证成功返回token用户 -> 认证中心: 下次访问头部携带token认证认证中心 <- 缓存: key=token+ip获取token其他服务 <- 认证中心: 存在且校验成功则跳转到用户请求的其他服务其他服务 -> 用户: 信息@enduml 1 箭头类型箭头形状 表示一条丢失的消息:末尾加 x 让箭头只有上半部分或者下半部分:将<和>替换成\或者 / 细箭头:将箭头标记写两次 (如 >> 或 //) 虚线箭头:用 – 替代 - 箭头末尾加圈:->o 双向箭头:<-> 1234567891011121314@startumlBob ->x AliceBob -> AliceBob ->> AliceBob -\ AliceBob \\-...
10 JSON数据
1 可视化JSON数据1234567891011121314151617181920212223242526@startjson{ "firstName": "John", "lastName": "Smith", "isAlive": true, "age": 27, "address": { "streetAddress": "21 2nd Street", "city": "New York", "state": "NY", "postalCode": "10021-3100" }, "phoneNumbers": [ { "type": &quo...
11 思维导图
mindmap兼容 orgmode 语法1234567891011121314@startmindmap* Debian** Ubuntu*** Linux Mint*** Kubuntu*** Lubuntu*** KDE Neon** LMDE** SolydXK** SteamOS** Raspbian with a very long name*** <s>Raspmbc</s> => OSMC*** <s>Raspyfi</s> => Volumio@endmindmap 兼容markdown语法1234567@startmindmap* root node * some first level node * second level node * another second level node * another first level node@endmindmap 用运算符决定方向1234567891011121314151617@startmindmap+ OS++ Ubuntu+++ Li...
2 用例图
0 实例123456789101112@startumlleft to right directionskinparam packageStyle rectangleactor customeractor clerkrectangle checkout { customer -- (checkout) (checkout) .> (payment) : include (help) .> (checkout) : extends (checkout) -- clerk}@enduml 1 定义用例 用例用圆括号括起来(两个圆括号看起来就像椭圆)。 也可以用关键字usecase来定义用例。 角色角色用两个冒号包裹起来。也可以用actor关键字来定义角色。 1234567891011@startuml(First usecase)(Another usecase) as (UC2)usecase UC3usecase (Last\nusecase) as UC4:First Actor::Another\nactor: as Man2ac...
4 对象图
1 对象可用用来表示数据库的数据表之间的关系。 1234@startumlobject firstObjectobject "My Second Object" as o2@enduml 2 与类图中的通用特性 可见性 定义注释 使用包 美化输出内容 对象间关系 3 添加属性* 123456789101112@startumlobject useruser : name = "Dummy"user : id = 123object user2 { name = "Dummy" id = 123}@enduml
3 类图
1 类元素元素声明12345678910111213@startumlabstract abstractabstract class "abstract class"annotation annotationcircle circle() circle_short_formclass classdiamond diamond<> diamond_short_formentity entityenum enuminterface interface@enduml 2 类间关系基本关系 虚线箭头指向依赖; 实线箭头指向关联; 虚线三角指向接口; 实线三角指向父类; 空心菱形能分离而独立存在,是聚合; 实心菱形精密关联不可分,是组合; 1234567891011121314@startumlClass01 <|-- Class02Class01 <|.....
5 活动图
0 活动图实例12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152@startumltitle Servlet Container(*) --> "ClickServlet.handleRequest()"--> "new Page"if "Page.onSecurityCheck" then ->[true] "Page.onInit()" if "isForward?" then ->[no] "Process controls" if "continue processing?" then -->[yes] ===RENDERING=== else -->[no] ===REDIRECT_CHECK=== endif else ...
6 状态图
1 简单状态 使用([*])开始和结束状态图。 使用–>添加箭头。 hide empty description隐藏元素的空内容 1234567891011@startuml[*] --> State1State1 --> [*]State1 : this is a stringState1 : this is another stringState1 -> State2State2 --> [*]@enduml 2 合成状态一个状态也可能是合成的,必须使用关键字state和花括号来定义合成状态。 12345678910111213141516171819202122@startumlscale 350 width[*] --> NotShootingstate NotShooting { [*] --> Idle Idle --> Configuring : EvConfig Configuring --> Idle : EvConfig}state Configuring { [*...
9 ER图
实例可以用来表示数据库中数据表的内容和数据表之间的关系 123456789101112131415161718192021222324252627282930313233@startuml' hide the spothide circle' avoid problems with angled crows feetskinparam linetype orthoentity "Entity01" as e01 { *e1_id : number <<generated>> -- *name : text description : text}entity "Entity02" as e02 { *e2_id : number <<generated>> -- *e1_id : number <<FK>> other_details : text}entity "Entity03&qu...
0 概述
概述1 背景产生原因Go是Google开发的一种静态、强类型、编译型、并发型,并具有垃圾回收功能的类C编程语言。2009以开源项目的形式发布,2012年发布1.0稳定版本,距今已经十年了。 Go语言之父Pike提到:Go语言是以C为原型,以C++为目标而设计的。因为他觉得C++忒复杂了,要解救程序员于水火。 核心设计师Pike和Ken都是出身自贝尔实验室,Ken之于Pike,亦师亦友,共同发明了UTF-8,还共同结对编程过,感情好的像穿一条裤子。 Pike是Unix先驱,贝尔实验室最早跟Ken、Dennis一起开发Unix的猛人,Plan9 OS的灵魂人物。大胡子Ken爷爷则是Unix之父,和Dennis一起发明了C语言,殿堂骨灰级程序员,早已是名满天下。 设计哲学C++语法自由自在,于是乎一群大佬为tab or space、大括号要不要换行等诸如此类的格式问题吵得不可开交。Go设计师认为,都是吃饱了撑的。 Go编译器内建工具gofmt强制源码格式化。对不起,没有选项,我的地盘听我的,把精力focus到真正重要的事情上来,停止无意义的争吵。 Go在某些点确实有突破,比如让并发编程...













