没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
valast-将Go值转换为其AST Valast在运行时将Go值转换为其等效的go/ast ,例如: x := & foo. Bar { a : "hello world!" , B : 1.234 , } fmt . Println ( valast . String ( x )) 打印字符串: & foo. Bar { a : "hello world!" , B : 1.234 } 这有什么用? 这对于调试和测试很有用,您可能会认为它是fmt包的%+v和%#v格式设置指令的更全面且可配置的版本。 它类似于Python中的repr 。 特征 通过go/ast生成Go代码,将格式延迟为同类最佳的Go格式器 。 完全处理未导出的字段,类型和值(可选)。 非常强调用于生成有效的Go代码,这些代码可以直接复制并粘贴到例如测试中。 ,进行了88项测试,并处理了许
资源推荐
资源详情
资源评论
收起资源包目录
valast:将Go值转换为其AST (148个子文件)
commit-msg 621B
valast_test.go 26KB
valast.go 20KB
types.go 6KB
util.go 3KB
format_composite_literals.go 2KB
profiler.go 816B
test.go 482B
cycle_detector.go 433B
complex_recursive.go 209B
TestStringFormatting__long_multi_line_with_quotes.golden 188B
TestEdgeCases__ptr_to_ptr_to_interface.golden 186B
TestStringFormatting__long_multi_line_with_backticks.golden 183B
TestStringFormatting__long_single_line_180.golden 182B
TestStringFormatting__long_multi_line_180.golden 181B
TestRecursion__basic.golden 177B
TestPointers__interface2.golden 161B
TestEdgeCases__ptr_to_interface.golden 157B
TestEdgeCases__ptr3_to_nil_interface.golden 150B
TestPointers__interface.golden 133B
TestString__interface_anonymous.golden 128B
TestEdgeCases__ptr2_to_nil_interface.golden 119B
TestPointers__unsafe_pointer2.golden 98B
TestString__interface.golden 92B
TestEdgeCases__ptr_to_nil_interface.golden 90B
TestExportedOnly_input__interface.golden 79B
TestPointers__struct2.golden 77B
TestPointers__pointer2.golden 73B
TestExportedOnly_input__map_unexported_key_type.golden 71B
TestPointers__map2.golden 71B
TestExportedOnly_input__map_unexported_value_type.golden 71B
TestRecursion__struct_cyclic.golden 71B
TestExportedOnly_input__unsafe_pointer.golden 70B
TestPointers__int3.golden 69B
TestString__slice.golden 69B
TestExportedOnly_input__complex128.golden 67B
TestPointers__unsafe_pointer.golden 66B
TestExportedOnly_nested__interface.golden 66B
TestExportedOnly_input__complex64.golden 66B
TestExportedOnly_input__float32.golden 64B
TestExportedOnly_input__pointer.golden 64B
TestExportedOnly_input__float64.golden 64B
TestExportedOnly_input__uintptr.golden 64B
TestExportedOnly_input__struct.golden 63B
TestExportedOnly_input__string.golden 63B
TestExportedOnly_input__uint32.golden 63B
TestExportedOnly_input__uint64.golden 63B
TestExportedOnly_input__uint16.golden 63B
TestExportedOnly_input__slice.golden 62B
TestExportedOnly_input__array.golden 62B
TestExportedOnly_input__uint8.golden 62B
TestExportedOnly_input__int64.golden 62B
TestExportedOnly_input__int16.golden 62B
TestString__struct_external_package.golden 62B
TestExportedOnly_input__int32.golden 62B
TestExportedOnly_input__uint.golden 61B
TestExportedOnly_input__bool.golden 61B
TestExportedOnly_input__int8.golden 61B
TestExportedOnly_input__int.golden 60B
TestExportedOnly_input__map.golden 60B
TestString__struct_anonymous.golden 56B
TestString__array.golden 54B
TestExportedOnly_input__struct_same_package.golden 50B
TestString__struct_same_package.golden 50B
TestPointers__pointer.golden 50B
TestPointers__int2.golden 47B
TestPointers__bool2.golden 47B
TestPointers__complex128.golden 47B
TestPointers__complex64.golden 45B
TestUnexportedInputs__unsafe_pointer.golden 44B
TestPointers__array2.golden 42B
TestPointers__struct.golden 39B
TestPointers__slice2.golden 38B
TestString__map.golden 38B
TestPointers__map.golden 36B
TestPointers__string.golden 36B
TestExportedOnly_nested__struct_same_package_unexported_field_omitted.golden 36B
TestString__unsafe_pointer.golden 35B
TestUnexportedInputs__interface.golden 35B
TestPointers__float64.golden 34B
TestPointers__float32.golden 34B
TestPointers__uintptr.golden 34B
TestPointers__uint64.golden 32B
TestPointers__uint32.golden 32B
TestPointers__uint16.golden 32B
TestUnexportedInputs__complex128.golden 30B
TestPointers__uint8.golden 30B
TestPointers__int32.golden 30B
TestPointers__int16.golden 30B
TestPointers__int64.golden 30B
TestUnexportedInputs__complex64.golden 29B
TestPointers__uint.golden 28B
TestEdgeCases__nil_interface_pointer.golden 28B
TestPointers__int8.golden 28B
TestExportedOnly_nested__external_struct_unexported_field_omitted.golden 27B
TestPointers__int.golden 26B
TestPointers__bool.golden 25B
TestUnexportedInputs__string.golden 25B
TestUnexportedInputs__pointer.golden 24B
TestUnexportedInputs__slice.golden 24B
共 148 条
- 1
- 2
资源评论
巩硕
- 粉丝: 19
- 资源: 4593
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功