Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ name: Go

on:
push:
branches:
- master
branches: [ master ]
pull_request:
branches:
- master
branches: [ master ]

jobs:
test:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
fail-fast: false
matrix:
go-version: [ '1.17', '1.18', '1.19', '1.20' ]
go-version: [ '1.23' ]

services:
redis:
Expand All @@ -35,9 +35,7 @@ jobs:
run: go test -covermode atomic -coverprofile=covprofile ./...

- name: Install goveralls
env:
GO111MODULE: off
run: go get github.com/mattn/goveralls
run: go install github.com/mattn/goveralls@latest

- name: Send coverage
env:
Expand All @@ -48,6 +46,8 @@ jobs:
needs: [test]
if: github.repository == 'casbin/redis-watcher' && github.event_name == 'push'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v3
Expand All @@ -58,7 +58,7 @@ jobs:
node-version: '18.x'

- name: Install semantic-release
run: npm install --save-dev semantic-release@21.0.0
run: npm install --save-dev semantic-release@21.0.0 @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/github

- name: Run semantic-release
run: npx semantic-release
Expand Down
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
Redis Watcher
---
Redis Watcher
====

> For Go 1.17+, use v2.4.0+ ,
> For Go 1.16 and below, stay on v2.3.0.
> For Go 1.16 and below, stay on v2.3.0.

[![Go Report Card](https://goreportcard.com/badge/github.com/casbin/redis-watcher)](https://goreportcard.com/report/github.com/casbin/redis-watcher)
[![Go](https://github.com/casbin/redis-watcher/actions/workflows/ci.yml/badge.svg)](https://github.com/casbin/redis-watcher/actions/workflows/ci.yml)
[![report](https://goreportcard.com/badge/github.com/casbin/redis-watcher)](https://goreportcard.com/report/github.com/casbin/redis-watcher)
[![Coverage Status](https://coveralls.io/repos/github/casbin/redis-watcher/badge.svg?branch=master)](https://coveralls.io/github/casbin/redis-watcher?branch=master)
[![Go Reference](https://pkg.go.dev/badge/github.com/casbin/redis-watcher/v2.svg)](https://pkg.go.dev/github.com/casbin/redis-watcher/v2)
[![Release](https://img.shields.io/github/v/release/casbin/redis-watcher)](https://github.com/casbin/redis-watcher/releases/latest)
[![Godoc](https://godoc.org/github.com/casbin/redis-watcher?status.svg)](https://godoc.org/github.com/casbin/redis-watcher)
[![Release](https://img.shields.io/github/release/casbin/redis-watcher.svg)](https://github.com/casbin/redis-watcher/releases/latest)
[![Discord](https://img.shields.io/discord/1022748306096537660?logo=discord&label=discord&color=5865F2)](https://discord.gg/S5UjpzGZjN)
[![Sourcegraph](https://sourcegraph.com/github.com/casbin/redis-watcher/-/badge.svg)](https://sourcegraph.com/github.com/casbin/redis-watcher?badge)

Redis Watcher is a [Redis](http://redis.io) watcher for [Casbin](https://github.com/casbin/casbin).

## Installation

go get github.com/casbin/redis-watcher/v2
```bash
go get github.com/casbin/redis-watcher/v2
```

## Simple Example

```go
package main

import (
"fmt"
"log"

"github.com/casbin/casbin/v2"
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/casbin/redis-watcher/v2

go 1.18
go 1.23

require (
github.com/casbin/casbin/v2 v2.66.1
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw=
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0=
github.com/bsm/ginkgo/v2 v2.7.0 h1:ItPMPH90RbmZJt5GtkcNvIRuGEdwlBItdNVoyzaNQao=
github.com/bsm/ginkgo/v2 v2.7.0/go.mod h1:AiKlXPm7ItEHNc/2+OkrNG4E0ITzojb9/xWzvQ9XZ9w=
github.com/bsm/gomega v1.26.0 h1:LhQm+AFcgV2M0WyKroMASzAzCAJVpAxQXv4SaI9a69Y=
github.com/bsm/gomega v1.26.0/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
github.com/casbin/casbin/v2 v2.66.1 h1:HOFlZYTUYx8ktgv5fLNFo6hr4K18ogGFq/lnYXv1OfA=
github.com/casbin/casbin/v2 v2.66.1/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg=
github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44=
Expand Down