random_data.go 531 B

123456789101112131415
  1. // Copyright 2025 BackendServerTemplate Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package random
  5. import (
  6. "github.com/SongZihuan/BackendServerTemplate/tool/generate/basefile"
  7. "github.com/SongZihuan/BackendServerTemplate/tool/utils/fileutils"
  8. "github.com/SongZihuan/BackendServerTemplate/tool/utils/randomutils"
  9. )
  10. func WriteRandomData() error {
  11. return fileutils.Write(basefile.FileRandomData, randomutils.GenerateRandomString(40))
  12. }