github.com/keybase/client/go@v0.0.0-20241007131713-f10651d043c8/kbfs/libpages/tools/migrateActivityStatsStorerFromFileBasedToMySQL/main.go (about)

     1  package main
     2  
     3  import (
     4  	"os"
     5  
     6  	_ "github.com/go-sql-driver/mysql"
     7  	"github.com/keybase/client/go/kbfs/libpages"
     8  	"go.uber.org/zap"
     9  )
    10  
    11  const dsnENV = "DSN"
    12  
    13  func main() {
    14  	logger, err := zap.NewDevelopmentConfig().Build()
    15  	if err != nil {
    16  		panic(err)
    17  	}
    18  	libpages.MigrateActivityStatsStorerFromFileBasedToMySQL(
    19  		logger, os.Args[1], os.Getenv(dsnENV))
    20  }