mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Open DB only when needed
Former-commit-id: 2809fdfbbe56c1697a8a4699a11608fdefc33ef1 [formerly f3c48188157385a09b4aa8377727808faea640fd] [formerly f2ce94925b7a89b53d4fae7d7bef000174a9b7d2 [formerly 35366b6ef6fd94e16068eb8b27168c36421f2eb4 [formerly3dc0ea7524
]]] Former-commit-id: 6207c2b06c010c4056cdda511262ef5e66b938d7 [formerly 755e934bab151bb526062c0fd0f2378fe1100c90] Former-commit-id: a97aaa6e4146f587e3446a93caa4a2ad2bdb9e0c Former-commit-id:bb0f0845a5
This commit is contained in:
parent
b873121f10
commit
f3ec63e3a3
@ -380,6 +380,8 @@ func deletePage(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func listEverything() string {
|
func listEverything() string {
|
||||||
|
Open(RuntimeArgs.DatabaseLocation)
|
||||||
|
defer Close()
|
||||||
everything := `| Title | Current size | Changes | Total Size | |
|
everything := `| Title | Current size | Changes | Total Size | |
|
||||||
| --------- |-------------| -----| ------------- | ------------- |
|
| --------- |-------------| -----| ------------- | ------------- |
|
||||||
`
|
`
|
||||||
@ -403,6 +405,8 @@ func listEverything() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func dumpEverything() {
|
func dumpEverything() {
|
||||||
|
Open(RuntimeArgs.DatabaseLocation)
|
||||||
|
defer Close()
|
||||||
err := os.MkdirAll("dump", 0777)
|
err := os.MkdirAll("dump", 0777)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("Already exists")
|
fmt.Println("Already exists")
|
||||||
|
Loading…
Reference in New Issue
Block a user