Skip to content

A minimal boilerplate for building cross-platform system services in Go.

License

Notifications You must be signed in to change notification settings

ansxuman/go-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-service

This project provides a clean, modular architecture for creating system services that can run across different platforms. It handles platform-specific service management while maintaining a consistent interface for service operations.

GO-Service

Features

  • Clean Architecture: Modular design with platform-agnostic core
  • Cross-Platform: Supports Windows, Linux and macOS
  • Service Management: Easy installation, status checking and lifecycle management
  • Build Automation: TaskFile for consistent build and management commands

Project Overview

go-service/
├── Makefile                 # Build and installation automation
├── cmd/
│   └── service/
│       └── main.go          # Main entry point with CLI flags and command handling
├── internal/
│   ├── service/
│   │   └── service.go       # Core service implementation
│   └── platform/            # Platform-specific implementations
│       ├── config.go        # Configuration constants
│       ├── service.go       # Cross-platform service interface
│       ├── windows.go       # Windows-specific service management
│       ├── linux.go         # Linux-specific systemd service management
│       └── darwin.go        # macOS-specific launchd service management
└── go.mod                   # Go module definition

For detailed instructions, check the Medium article for a step-by-step guide.If you don’t have a Medium membership, you can also find the article on dev.to.

Donations

If you find this content useful, please consider donating to support its development and future improvements.

Buy Me A Coffee

About

A minimal boilerplate for building cross-platform system services in Go.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages