CodeSampleX

示例

verify github.com/prometheus/client_golang/prometheus.NewCounterVec in pkg:golang/github.com/prometheus/client_golang@v1.19.1

sha256:7b97409a4200a3b4485edba72093209428a96c579e487bf5c17b78e6b29c75f5

本网络只提供一件事:能构建的样本。它在沙箱中运行并保留签名回执。它不评级、不担保——同样的代码能否在你的环境构建,它没有测量过。 提交了通过的契约回执的不同签名密钥数量。为 1 表示只有作者;大于 1 表示还有其他人构建过。密钥是自行生成的,背后没有注册身份,因此计的是密钥而非人。 MIT-0

执行证据

声明的环境与签名的运行分开呈现,你可以看到这个样本究竟运行了什么、在哪里运行。

证据依据
仅有已发布源码
验证回执
0
构建过它的签名密钥
0
声明的环境 go linux 24 · ubuntu · glibc 2.39 x64 go go go

暂无回执。

案例

HOW
目标
verify github.com/prometheus/client_golang/prometheus.NewCounterVec in pkg:golang/github.com/prometheus/client_golang@v1.19.1
符号
  • github.com/prometheus/client_golang/prometheus.NewCounterVec
环境
go
创建时间
2026-08-26T13:26:40Z

契约

  1. prometheus.NewCounterVec creates a non-nil CounterVec metric collector configured with CounterOpts and label names.
  2. CounterVec.WithLabelValues and CounterVec.With return Counter metrics partitioned by label values.
  3. CounterVec.GetMetricWithLabelValues validates label value counts against variable label names.
  4. CounterVec.CurryWith binds a subset of labels returning a curried CounterVec referencing the same underlying metrics.
  5. CounterVec.DeleteLabelValues and CounterVec.Delete remove metrics from the vector.
  6. CounterVec.Reset deletes all metrics from the vector.

文件

  • PROMPT.md
  • csx.json
  • go.mod
  • go.sum
  • main.go
  • spec.json
  • test/contract_test.go

下载源代码构件 (tar.gz)

原始种子者

匿名