Skip to content

Set and Set* don't support custom type #3104

Open
@oldme-git

Description

@oldme-git
func TestI(t *testing.T) {
  type myInt int
  var i myInt = 123

  err := rdb.Set(ctx, "key", i, 0).Err()
  if err != nil {
    t.Fatal(err)
  }
}

result: redis: can't marshal * (implement encoding.BinaryMarshaler)

Activity

linked a pull request that will close this issue on Sep 4, 2024
OrHayat

OrHayat commented on Jan 7, 2025

@OrHayat

i got hit by this bug today is there reason why the fix was not merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @OrHayat@oldme-git

      Issue actions

        Set and Set* don't support custom type · Issue #3104 · redis/go-redis