| 1234567891011121314151617181920212223 |
- package files
- import (
- "log"
- "git.mmnx.de/mmnx/cdn/module"
- )
- func createTestData() {
- storage := &Storage{AbsolutePath: "/go/src/app/dev/files/"}
- module.HandleError(module.ErrDatabase, db.Create(storage).Error)
- // storage := &Storage{}
- // db.First(&storage, "id = ?", storage.ID)
- log.Printf("%#v", storage)
- module.HandleError(module.ErrDatabase, db.Create(&File{
- RelativePath: "test.txt",
- FileType: filetype_text,
- StorageID: storage.ID,
- Storage: *storage,
- }).Error)
- }
|