mirror of
https://github.com/Starlio-app/StarlioX
synced 2024-11-24 09:06: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"
|
||||
"strings"
|
||||
|
||||
"github.com/Redume/EveryNasa/api/utils"
|
||||
"github.com/Redume/EveryNasa/functions"
|
||||
"github.com/Redume/EveryNasa/utils"
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
var CreateLabel = func(c *fiber.Ctx) error {
|
||||
u, err := user.Current()
|
||||
if err != nil {
|
||||
functions.Logger(err.Error())
|
||||
utils.Logger(err.Error())
|
||||
}
|
||||
|
||||
dir, err := os.Getwd()
|
||||
if err != nil {
|
||||
functions.Logger(err.Error())
|
||||
utils.Logger(err.Error())
|
||||
}
|
||||
|
||||
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 {
|
||||
functions.Logger(err.Error())
|
||||
utils.Logger(err.Error())
|
||||
}
|
||||
|
||||
utils.Respond(c, utils.Message(true, "The shortcut was successfully created"))
|
||||
|
|
Loading…
Add table
Reference in a new issue