K
K
Kagtaviy2016-05-03 00:15:29
go
Kagtaviy, 2016-05-03 00:15:29

How to correctly create the id of a new entry?

Hello, there is a need to add news to the site.
I can't figure out how to properly organize this with redis + golang.
I fill in the fields and click create news, I need to assign a unique ID to it so that it can be edited. I understand that you need to use INCR to inflate a value.
But how do I find out what was the last id to add 1 to it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
index0h, 2016-05-03
@index0h

Use UUID Luke!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question