Questions tagged [golang-migrate]

golang-migrate is a database migration tool written in Go. Questions tagged golang-migrate should be directly related to database migrations in Go.

See https://github.com/golang-migrate/migrate

Database migrations written in Go. Use as CLI or import as library.

  • Migrate reads migrations from sources and applies them in correct order to a database.
  • Drivers are "dumb", migrate glues everything together and makes sure the logic is bulletproof. (Keeps the drivers lightweight, too.)
  • Database drivers don't assume things or try to correct user input. When in doubt, fail.
107 questions
-4
votes
1 answer

Execute the program every 5 minutes with gocron

I need to run my Co program continuously with five minute interval. I tried using gocron but the program is not giving any output. func hi() { fmt.Println("hi") } func main() { gocron.Every(5).Minute().Do(hi) } I expect this to run and…
-6
votes
1 answer

How to get the digits of int value in Golang

How can we get the digits of num := 658943 in Golang? I need to print each digit value from the given number (num) as integer instead of string. package main import "fmt" func main() { var ( num = 68932 digits []int ) …
vinodh kumar
  • 137
  • 2
  • 10
1 2 3 4 5 6 7
8