文章分类 -  golang

摘要:1. 什么是反射? In computer science, reflection programming is the ability of a process to examine, introspect, and modify its own structure and behavior.[7 阅读全文
posted @ 2022-04-30 15:57 code_wk 阅读(166) 评论(0) 推荐(0) 编辑
摘要:本文结合unicode[2]标准和UTF-8[1](8-bit Unicode Transformation Format)的原理,分析golang标准库中的utf-8实现。 unicode unicode是计算机科学领域的业界标准。它整理、编码了世界上大部分的文字系统,使得电脑可以用更为简单的方式 阅读全文
posted @ 2022-04-30 15:19 code_wk 阅读(470) 评论(0) 推荐(0) 编辑
摘要:golang没有提供try-catch类似的错误处理机制,在设计层面采用了C语言风格的错误处理,通过函数返回值返回出错的错误信息,具体样例如下: func ReturnError() (string, error) { return "", fmt.Errorf("Test Error") } fu 阅读全文
posted @ 2022-04-30 15:17 code_wk 阅读(224) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示