No description
Find a file
2025-10-24 04:55:10 +01:00
cmd/app Add initial project structure with core functionality and basic files 2025-10-24 04:55:10 +01:00
config Add initial project structure with core functionality and basic files 2025-10-24 04:55:10 +01:00
crypt Add initial project structure with core functionality and basic files 2025-10-24 04:55:10 +01:00
display Add initial project structure with core functionality and basic files 2025-10-24 04:55:10 +01:00
docs Add initial project structure with core functionality and basic files 2025-10-24 04:55:10 +01:00
filesystem Add initial project structure with core functionality and basic files 2025-10-24 04:55:10 +01:00
workspace Add initial project structure with core functionality and basic files 2025-10-24 04:55:10 +01:00
.gitignore Add initial project structure with core functionality and basic files 2025-10-24 04:55:10 +01:00
actions.go Add initial project structure with core functionality and basic files 2025-10-24 04:55:10 +01:00
core.go Add initial project structure with core functionality and basic files 2025-10-24 04:55:10 +01:00
go.mod Add initial project structure with core functionality and basic files 2025-10-24 04:55:10 +01:00
header.go Add initial project structure with core functionality and basic files 2025-10-24 04:55:10 +01:00
LICENSE.txt Add initial project structure with core functionality and basic files 2025-10-24 04:55:10 +01:00
Makefile Add initial project structure with core functionality and basic files 2025-10-24 04:55:10 +01:00
README.md Add initial project structure with core functionality and basic files 2025-10-24 04:55:10 +01:00
Taskfile.yaml Add initial project structure with core functionality and basic files 2025-10-24 04:55:10 +01:00

Core

A Helper for GoLang projects, who also use, but not exclusive to Wails.io v3+

You need a file called apptray.png in your assets folder

package main

import (
	"embed"

	"github.com/Snider/Core"
	"github.com/Snider/Core/display"
	"github.com/wailsapp/wails/v3/pkg/application"
)

//go:embed all:public/*
var assets embed.FS

func main() {

	app := application.New(application.Options{
		Assets: application.AssetOptions{
			Handler: application.AssetFileServerFS(assets),
		},
	})

	app.RegisterService(application.NewService(core.Service(
		core.WithWails(app), // Provides the Wails application instance to core services
		core.WithAssets(assets), // Provides the embed.FS to core services
		core.WithService(display.Register), // Provides the ability to open windows
		core.WithService(config.Register), // Provides the ability to persist UI state (windows reopen where they closed)
		core.WithServiceLock(), // locks core from accepting new services blocking access to IPC
	)))

	err := app.Run()
	if err != nil {
		panic(err)
	}
}