mirror of
https://github.com/Starlio-app/StarlioX
synced 2024-11-21 08:36:22 +03:00
change name folder, project file optimization
This commit is contained in:
parent
de77b44647
commit
0fa390c8ee
1 changed files with 5 additions and 6 deletions
|
@ -5,27 +5,26 @@ import (
|
||||||
"os/user"
|
"os/user"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/Redume/EveryNasa/api/utils"
|
"github.com/Redume/EveryNasa/utils"
|
||||||
"github.com/Redume/EveryNasa/functions"
|
|
||||||
"github.com/gofiber/fiber/v2"
|
"github.com/gofiber/fiber/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
var CreateLabel = func(c *fiber.Ctx) error {
|
var CreateLabel = func(c *fiber.Ctx) error {
|
||||||
u, err := user.Current()
|
u, err := user.Current()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
functions.Logger(err.Error())
|
utils.Logger(err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
dir, err := os.Getwd()
|
dir, err := os.Getwd()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
functions.Logger(err.Error())
|
utils.Logger(err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
dir = strings.Replace(dir, "\\", "\\\\", -1) + "\\EveryNasa.exe"
|
dir = strings.Replace(dir, "\\", "\\\\", -1) + "\\EveryNasa.exe"
|
||||||
|
|
||||||
err = functions.CreateLnk(dir, strings.Replace(u.HomeDir, "\\", "\\\\", -1)+"\\Desktop\\EveryNasa.lnk")
|
err = utils.CreateLnk(dir, strings.Replace(u.HomeDir, "\\", "\\\\", -1)+"\\Desktop\\EveryNasa.lnk")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
functions.Logger(err.Error())
|
utils.Logger(err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
utils.Respond(c, utils.Message(true, "The shortcut was successfully created"))
|
utils.Respond(c, utils.Message(true, "The shortcut was successfully created"))
|
||||||
|
|
Loading…
Add table
Reference in a new issue