# go-redis-lock **Repository Path**: g_night/go-redis-lock ## Basic Information - **Project Name**: go-redis-lock - **Description**: 基于go-redis的分布式锁,自动续期,可重入特性 - **Primary Language**: Go - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-12-17 - **Last Updated**: 2025-02-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # go-redis-lock #### 介绍 基于go-redis的分布式锁,具备自动续期,可重入等能力 #### 使用说明 ```go result, err := LockTransaction("say_hello", reqID, func() error { ... return nil }) // 加锁失败 if !result { ... return } // 执行错误 if err != nil { ... return } ```