---
title: "Dan Che (@dche) | Hashnode"
description: "A software engineer love building & shareing. Read the latest articles by Dan Che on Hashnode."
url: "https://hashnode.com/@dche"
---

@dche

# Dan Che

@dche · Joined May 2024

A software engineer love building & shareing

### [用gum给IRedis增加数据源选择能力](https://chedan.io/gum-iredis?utm_source=hashnode&utm_medium=feed)

gum 是一个很有趣的“胶水”工具，可以方便地为 shell 脚本提供交互能力，本文以整体IRedis为例展示其使用方法

2 min read · [chedan.io](https://chedan.io/gum-iredis?utm_source=hashnode&utm_medium=feed)

[Jan 12, 2024](https://hashnode.com/posts/gum-iredis/664c6d1a8d87303c08a683e2)

### [在gorm中使用乐观锁](https://chedan.io/gorm-optimistic-lock?utm_source=hashnode&utm_medium=feed)

借助乐观锁plugin，在GORM中使用乐观锁是非常简单直接的

3 min read · [chedan.io](https://chedan.io/gorm-optimistic-lock?utm_source=hashnode&utm_medium=feed)

[Aug 24, 2022](https://hashnode.com/posts/gorm-optimistic-lock/664c6d16b520b1a38d5489f1)

### [借助 docker 对 GORM 应用进行单元测试](https://chedan.io/unit-test-gorm-application?utm_source=hashnode&utm_medium=feed)

在大多数情况下，用docker中的真实数据库作单元测试要远好于使用Sqlmock

4 min read · [chedan.io](https://chedan.io/unit-test-gorm-application?utm_source=hashnode&utm_medium=feed)

[Jul 26, 2022](https://hashnode.com/posts/unit-test-gorm-application/664c6d22ebd0d281593c972d)

### [是时候从 ahmetb/go-linq 升级到 samber/lo 了](https://chedan.io/replace-linq-with-lo?utm_source=hashnode&utm_medium=feed)

golang开发中经常需要集合数据进行转换、过滤、汇总等。以前这些工作常用linq来完成，但golang1.18发布后内置了泛型的支持。 这时lo库就成了更好的选择

2 min read · [chedan.io](https://chedan.io/replace-linq-with-lo?utm_source=hashnode&utm_medium=feed)

[Jun 16, 2022](https://hashnode.com/posts/replace-linq-with-lo/664c6d20eb7e27d7e53c91fa)

### [IPNS (InterPlanetary Name System) 详解](https://chedan.io/ipns?utm_source=hashnode&utm_medium=feed)

IPFS(InterPlanetary Name System) 是IPFS的名称寻址系统，有了它就可以为可变内容提供稳定的地址了

2 min read · [chedan.io](https://chedan.io/ipns?utm_source=hashnode&utm_medium=feed)

[Jun 13, 2022](https://hashnode.com/posts/ipns/664c6d1e681fb675827966e5)
