我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

去测试正则表达式类型或语法

What type or syntax of regex is used when running go test -r <regex> commands? I'm using -list to find the tests I want to run before using -r, like this:

go test -list 'Foo' *.go

I'm having specific difficulty with the following two test names:

func TestSendTrap(...
func TestSendTrapFull(...

This works:

go test -list 'TestSendTrap\b' *.go

So I'm presuming PCRE syntax is being used, but command go doesn't detail.

It's Go regex, documented in regexp/syntax.

近期文章

  • 使用Gorilla Mux端点通过HTTP流数据
  • 使用golang中的位集表示功能
  • 转到http侦听器,每秒钟更新一次数据
  • 生成docker命令会产生空结果
  • 通过渠道与Go交流
  • 将界面转换为另一个并复制内容
  • 为什么此代码未定义行为? [重复]
  • 当我尝试使用go lang调用值时遇到错误
  • 找不到命令“ bee”
  • 挥舞着路径参数
  • 使用AWS-GO-SDK的UnmarshalMap
  • 在网址参数中获取字节数组作为字符串
  • 从JSON字符串值解析JSON
  • 如何在功能中修改GORM DB指针?
  • Go中带有缓冲通道的goroutine泄漏
  • 设置POST请求表单数据变量
  • 如何在golang中为变量分配运算符?
  • 在golang频道中未收到
  • 使用Go(Golang)清除先前的请求RESTFul吗?
  • 我想验证来自golang前端的后端时区

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华