UUID的Base 64编码-用作访问令牌

I am writing a GoLang Oauth application in which I am using below method to generate a UUID and then generate accessToken from the UUID.

import "github.com/pborman/uuid"
uuid := uuid.NewRandom()
accessToken = base64.RawURLEncoding.EncodeToString([]byte(uuid)) 

Wanted to know the base64 encoding of a token is as unique as UUID or not because accessToken will have unique index in my MYSQL db and will fail if there is a collision.

Yes it's unique because your uuid is unique. Why don't you use uuid as token ? There is no need to base64 it you can use that as is.

Base64 is just an encoding. It neither removes information nor adds information. It is also reversible. Based on this the uniqueness of the base64 encoded uuid is exactly the same as of the non-encoded uuid.