golang-samber-lo
Build Go Collection Pipelines with samber/lo
Manual Go collection transformations can become repetitive and difficult to optimize. This skill applies samber/lo helpers while explaining package choice, compatibility, errors, and performance tradeoffs.
使用我的智能体安装
将此请求复制给你的智能体,其中包含权威 Skill 页面和清单。
Review the Skillstore skill "golang-samber-lo" from https://skillstore.io/skills/samber-golang-samber-lo.md and its manifest at https://skillstore.io/api/skills/samber-golang-samber-lo/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.你的智能体仍应展示其计划,并按安全策略请求必要确认。
Agent 可读资源
当 AI Agent、爬虫或脚本需要干净上下文,而不是读取完整页面时,请使用这些链接。
测试它
正在使用“golang-samber-lo”。 Choose between the standard library and samber/lo for checking membership in a string slice.
预期结果:
- Recommendation: use slices.Contains when the project targets Go 1.21 or newer.
- Reason: the standard library already covers direct membership checks without another helper.
- Use lo.ContainsBy when membership requires a custom predicate.
正在使用“golang-samber-lo”。 Select a package for three chained transformations over one million records on Go 1.23.
预期结果:
- Recommendation: evaluate loi for a lazy, single-pass pipeline.
- Benefit: lazy iteration can remove intermediate slice allocations.
- Validation: compare memory profiles and benchmarks against the simpler lo implementation.
正在使用“golang-samber-lo”。 Advise whether a request handler should use lo.Must when parsing user input.
预期结果:
- Recommendation: return and handle the parsing error explicitly.
- Risk: lo.Must converts invalid input into a panic.
- Reserve lo.Must for startup or test failures where termination is intentional.
安全审计
安全All 84 static findings are false positives caused by Markdown backticks, Go import syntax, documentation links, and ordinary Go terminology. No prompt injection, data exfiltration, reconnaissance, dynamic execution, or malicious command intent was found.
风险因素
⚙️ 外部命令 (50)
⚡ 包含脚本 (1)
🌐 网络访问 (5)
分享与引用此报告
分享版本化评估报告、中性徽章、嵌入卡片和引用。Skillstore 只报告证据,不判断该 Skill 是否安全。
复制报告链接
https://skillstore.io/skills/samber-golang-samber-lo/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportMarkdown 徽章
[](https://skillstore.io/skills/samber-golang-samber-lo?utm_source=security_passport_badge)HTML 徽章
<a href="https://skillstore.io/skills/samber-golang-samber-lo?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/samber-golang-samber-lo/security.svg" alt="Skillstore security assessment" loading="lazy"></a>嵌入卡片
<iframe src="https://skillstore.io/embed/skills/samber-golang-samber-lo.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>学术引用 (APA · BibTeX · CFF)
APA 引用
samber. (2026). golang-samber-lo security audit report (audit version 1) [Author version 1.2.2]. Skillstore. https://skillstore.io/skills/samber-golang-samber-lo/audits/1BibTeX 引用
@techreport{samber-samber-golang-samber-lo-2026,
author = {samber},
title = {golang-samber-lo security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/samber-golang-samber-lo/audits/1},
note = {Author version 1.2.2}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "golang-samber-lo security audit report (audit version 1)"
version: "1.2.2"
type: report
authors:
- name: "samber"
date-released: "2026-09-06"
url: "https://skillstore.io/skills/samber-golang-samber-lo/audits/1"
identifiers:
- type: other
value: "skillstore:samber-golang-samber-lo:audit:1"
description: "Skillstore immutable audit report identifier"
Skillstore 评分
评分依据 证据置信度: 中你能构建什么
Refactor collection loops
Convert repetitive slice and map loops into concise, typed samber/lo transformations while preserving behavior.
Optimize data transformations
Compare eager, parallel, mutable, and lazy approaches using workload size, CPU cost, allocation data, and Go version.
Evaluate library adoption
Assess where samber/lo adds value over standard library helpers and identify compatibility or maintenance tradeoffs.
试试这些提示
Explain whether samber/lo is appropriate for [operation] in a project targeting Go [version]. Compare the standard library and lo, then recommend one.
Refactor this Go collection loop using samber/lo: [paste logic]. Preserve behavior, handle errors explicitly, and explain each selected helper.
Analyze this pipeline of [size] items and select lo, lop, lom, or loi. Consider CPU cost, allocations, mutation, concurrency, and Go version.
Design a production Go transformation for [input and goal] using samber/lo. Include error strategy, complexity, allocation tradeoffs, tests, and benchmark checkpoints.
最佳实践
- Provide the Go version, data size, workload type, and current implementation with each request.
- State whether mutation, output order, partial failures, and cancellation are acceptable.
- Profile and benchmark before adopting mutable, parallel, lazy, or experimental variants.
避免
- Do not request parallel helpers without describing whether work is CPU-bound or input sizes are large.
- Do not replace standard library helpers solely because samber/lo is already installed.
- Do not use panic-based helpers for routine failures in handlers or long-running services.
常见问题
What does this skill help with?
Which Go versions are supported?
Should I always prefer samber/lo over the standard library?
When should I use lop?
Does lo modify input collections?
Can this skill optimize streaming pipelines?
开发者详情
作者
samber许可证
MIT
作者版本
v1.2.2
Skillstore 修订
r1
引用
e5464e662405de6361fdde6b984f9ea865635f64
维护新鲜度
2026/9/8
使用量
1 次下载 · 0 次浏览
文件结构