- 3 Posts
- 4 Comments
Joined 2 years ago
Cake day: June 19th, 2023
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.
noornee@lemmy.mlOPto Neovim@sopuli.xyz•[SOLVED] How do i override nvim-web-devicons cancel(X) iconEnglish1·2 years agoThanks ^^
hii, I’m not well versed with neovim but i just tried out your autocmd and it worked after i replaced “callback” with “command”
callback
accepts (Lua function or Vimscript function name string) whilecommand
accepts (Ex command string).check
:h nvim_create_autocmd()
for more info
noornee@lemmy.mlOPto Go programming language discussion@lemmy.ml•a bson struct tag to create a unique index just like gorm1·2 years agoHello, Thanks for responding. ^^
i didn’t want to make any changes to the id field.
i have a user struct like this.
type User struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"id"` FirstName string `bson:"firstname" json:"firstname"` LastName string `bson:"lastname" json:"lastname"` Email string `bson:"email" index:"email" json:"email"` }
i wanted the Email field to be unique, just like the ID. so when a new user tries to create an account with the same email, it’ll return an error.
it isn’t a problem anymore because i figured out a way… i created a custom struct tag that validates whether a user with the same email exist in the database.
gottem lmao