diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e243392 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,97 @@ +name: CI + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + test: + name: Test + runs-on: ubuntu-latest + permissions: + contents: read + strategy: + matrix: + go-version: [ '1.19', '1.20', '1.21', '1.22' ] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go-version }} + + - name: Cache Go modules + uses: actions/cache@v4 + with: + path: | + ~/.cache/go-build + ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-${{ matrix.go-version }}- + + - name: Download dependencies + run: go mod download + + - name: Verify dependencies + run: go mod verify + + - name: Build + run: go build -v . + + - name: Run go vet + run: go vet . + + - name: Run tests + run: go test -v -race -coverprofile=coverage.txt -covermode=atomic . + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + file: ./coverage.txt + flags: unittests + name: codecov-umbrella + continue-on-error: true + + lint: + name: Lint + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.22' + + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v6 + with: + version: latest + + example: + name: Test Example + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: '1.22' + + - name: Run CLI example + run: cd examples && go run demo.go diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..18b66d7 --- /dev/null +++ b/.gitignore @@ -0,0 +1,39 @@ +# Binaries for programs and plugins +*.exe +*.exe~ +*.dll +*.so +*.dylib + +# Test binary, built with `go test -c` +*.test + +# Output of the go coverage tool, specifically when used with LiteIDE +*.out + +# Dependency directories +vendor/ + +# Go workspace file +go.work + +# IDE specific files +.idea/ +.vscode/ +*.swp +*.swo +*~ + +# OS specific files +.DS_Store +Thumbs.db + +# Build artifacts +bin/ +dist/ +build/ + +# Coverage files +coverage.txt +coverage.html +*.coverprofile diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..b7c8dcd --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,33 @@ +linters-settings: + govet: + enable-all: true + gocyclo: + min-complexity: 15 + dupl: + threshold: 100 + goconst: + min-len: 2 + min-occurrences: 2 + +linters: + enable: + - errcheck + - gosimple + - govet + - ineffassign + - staticcheck + - unused + - gofmt + - goimports + - misspell + - revive + - stylecheck + +run: + timeout: 5m + tests: true + +issues: + exclude-use-default: false + max-issues-per-linter: 0 + max-same-issues: 0 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..96fd5d0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2025 Snider + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6e87cc6 --- /dev/null +++ b/Makefile @@ -0,0 +1,77 @@ +.PHONY: help build test test-coverage test-bench lint fmt vet clean example example-ui install-tools + +# Default target +help: + @echo "Available targets:" + @echo " make build - Build the project" + @echo " make test - Run tests" + @echo " make test-coverage - Run tests with coverage" + @echo " make test-bench - Run benchmark tests" + @echo " make lint - Run golangci-lint" + @echo " make fmt - Format code with gofmt" + @echo " make vet - Run go vet" + @echo " make clean - Clean build artifacts" + @echo " make example - Run the example program (CLI demo)" + @echo " make example-ui - Run the Wails UI example" + @echo " make install-tools - Install development tools" + +# Build the project +build: + @echo "Building..." + @go build -v . + +# Run tests +test: + @echo "Running tests..." + @go test -v -race . + +# Run tests with coverage +test-coverage: + @echo "Running tests with coverage..." + @go test -v -race -coverprofile=coverage.txt -covermode=atomic . + @go tool cover -html=coverage.txt -o coverage.html + @echo "Coverage report generated: coverage.html" + +# Run benchmark tests +test-bench: + @echo "Running benchmark tests..." + @go test -bench=. -benchmem . + +# Run golangci-lint (requires installation) +lint: + @echo "Running golangci-lint..." + @which golangci-lint > /dev/null || (echo "golangci-lint not installed. Run 'make install-tools'" && exit 1) + @golangci-lint run . + +# Format code +fmt: + @echo "Formatting code..." + @go fmt . + +# Run go vet +vet: + @echo "Running go vet..." + @go vet . + +# Clean build artifacts +clean: + @echo "Cleaning..." + @rm -f coverage.txt coverage.html + @go clean -cache -testcache -modcache + @rm -rf bin/ + +# Run the example program +example: + @echo "Running example..." + @cd examples && go run demo.go + +# Run the Wails UI example (requires Wails v3 with UI support) +example-ui: + @echo "Running Wails UI example..." + @cd examples && go run main.go + +# Install development tools +install-tools: + @echo "Installing development tools..." + @go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest + @echo "Tools installed successfully" diff --git a/README.md b/README.md index e8217fe..7466d06 100644 --- a/README.md +++ b/README.md @@ -1 +1,272 @@ -# Core \ No newline at end of file +# Core + +[![Go Version](https://img.shields.io/badge/Go-%3E%3D%201.19-blue)](https://golang.org/) +[![Wails](https://img.shields.io/badge/Wails-v3.0.0--alpha.36-blue)](https://wails.io) +[![License](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE) + +A Wails v3 service library starter project providing core utilities and helper functions. This library can be integrated into any Wails v3 application to provide backend functionality accessible from the frontend. + +## Features + +- ๐Ÿš€ Ready-to-use Wails v3 service structure +- โœ… Comprehensive test coverage +- ๐Ÿ“ Well-documented code with examples +- ๐Ÿ”ง Makefile for common development tasks +- ๐ŸŽฏ GitHub Actions CI/CD pipeline +- ๐Ÿ“ฆ Example Wails application included +- ๐ŸŒ Interactive frontend demo + +## What is a Wails v3 Service? + +Wails v3 services are Go packages that can be registered with a Wails application and called from the frontend JavaScript/TypeScript code. This allows you to write backend logic in Go and expose it to your web-based UI seamlessly. + +## Installation + +```bash +go get github.com/Snider/Core +``` + +### Prerequisites + +- Go 1.19 or higher +- Wails v3 CLI (for running the example): + ```bash + go install github.com/wailsapp/wails/v3/cmd/wails3@v3.0.0-alpha.36 + ``` + +## Usage + +### Creating a New Wails Application + +If you're starting fresh, create a new Wails v3 application: + +```bash +# Install Wails v3 CLI (if not already installed) +go install github.com/wailsapp/wails/v3/cmd/wails3@v3.0.0-alpha.36 + +# Create a new Wails application +wails3 init -n myfirstapp + +# Navigate to your new project +cd myfirstapp +``` + +Then add this service library to your project: + +```bash +go get github.com/Snider/Core +``` + +### Integrating into Your Wails Application + +```go +package main + +import ( + "github.com/Snider/Core" + "github.com/wailsapp/wails/v3/pkg/application" +) + +func main() { + // Create the Core service + coreService := core.NewCoreService() + + // Create Wails application with the service + app := application.New(application.Options{ + Name: "My App", + Description: "My Wails Application", + Services: []application.Service{ + application.NewService(coreService), + }, + }) + + // Create and run your application... + app.Run() +} +``` + +### Calling from Frontend + +Once registered, you can call the service methods from your frontend JavaScript: + +```javascript +// Get version +const version = await wails.Call.ByName('github.com.Snider.Core.GetVersion'); + +// Greet user +const greeting = await wails.Call.ByName('github.com.Snider.Core.Greet', 'World'); +console.log(greeting); // "Hello, World!" + +// Perform calculations +const sum = await wails.Call.ByName('github.com.Snider.Core.Add', 10, 20); +const product = await wails.Call.ByName('github.com.Snider.Core.Multiply', 5, 6); + +// Complex calculations with error handling +try { + const result = await wails.Call.ByName('github.com.Snider.Core.Calculate', 'divide', 100, 4); + console.log(result); // 25 +} catch (error) { + console.error('Calculation error:', error); +} +``` + +## Available Service Methods + +The `CoreService` provides the following methods: + +- **`ServiceName() string`** - Returns the service identifier +- **`GetVersion() string`** - Returns the current version +- **`Greet(name string) string`** - Returns a greeting message +- **`Add(a, b int) int`** - Adds two integers +- **`Multiply(a, b int) int`** - Multiplies two integers +- **`Calculate(operation string, a, b int) (int, error)`** - Performs calculations + - Supported operations: `"add"`, `"subtract"`, `"multiply"`, `"divide"` + +## Running the Example + +The example demonstrates a complete Wails application using the Core service: + +```bash +cd examples +go run main.go +``` + +This will launch a Wails application window with an interactive UI that calls the Core service methods. + +## Development + +### Building + +```bash +make build +``` + +### Testing + +Run all tests: + +```bash +make test +``` + +Run tests with coverage: + +```bash +make test-coverage +``` + +Run benchmark tests: + +```bash +make test-bench +``` + +### Code Quality + +Format code: + +```bash +make fmt +``` + +Run static analysis: + +```bash +make vet +``` + +Run linter (requires golangci-lint): + +```bash +make lint +``` + +### Installing Development Tools + +```bash +make install-tools +``` + +## Project Structure + +``` +. +โ”œโ”€โ”€ .github/ +โ”‚ โ””โ”€โ”€ workflows/ +โ”‚ โ””โ”€โ”€ ci.yml # GitHub Actions CI/CD +โ”œโ”€โ”€ examples/ +โ”‚ โ”œโ”€โ”€ frontend/ +โ”‚ โ”‚ โ””โ”€โ”€ index.html # Example UI +โ”‚ โ””โ”€โ”€ main.go # Example Wails application +โ”œโ”€โ”€ .gitignore # Git ignore rules +โ”œโ”€โ”€ .golangci.yml # Linter configuration +โ”œโ”€โ”€ core.go # Core service implementation +โ”œโ”€โ”€ core_test.go # Tests +โ”œโ”€โ”€ go.mod # Go module definition +โ”œโ”€โ”€ LICENSE # MIT License +โ”œโ”€โ”€ Makefile # Development tasks +โ””โ”€โ”€ README.md # This file +``` + +## Creating Your Own Service + +Use this project as a template to create your own Wails v3 service: + +1. Fork or clone this repository +2. Update the module name in `go.mod` +3. Modify `core.go` to implement your service logic +4. Update the `ServiceName()` method to return your service identifier +5. Add your methods (they will be automatically exposed to the frontend) +6. Write tests for your methods +7. Update the example to demonstrate your service + +### Service Method Requirements + +For methods to be callable from the frontend: + +- Must be exported (start with uppercase letter) +- Must belong to a struct that implements the service interface +- Can accept basic types and structs as parameters +- Can return values and errors + +## API Documentation + +Full API documentation is available on [pkg.go.dev](https://pkg.go.dev/github.com/Snider/Core). + +Generate documentation locally: + +```bash +go doc -all +``` + +## Contributing + +Contributions are welcome! Please feel free to submit a Pull Request. + +1. Fork the repository +2. Create your feature branch (`git checkout -b feature/amazing-feature`) +3. Commit your changes (`git commit -m 'Add some amazing feature'`) +4. Push to the branch (`git push origin feature/amazing-feature`) +5. Open a Pull Request + +## Testing Guidelines + +- Write tests for all new functionality +- Maintain or improve code coverage +- Run `make test` before submitting PRs +- Include benchmark tests for performance-critical code + +## License + +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. + +## Resources + +- [Wails v3 Documentation](https://wails.io) +- [Wails v3 GitHub Repository](https://github.com/wailsapp/wails) +- [Go Documentation](https://golang.org/doc/) + +## Acknowledgments + +- Built with โค๏ธ using Go and Wails v3 +- Inspired by Wails best practices and community standards \ No newline at end of file diff --git a/core.go b/core.go new file mode 100644 index 0000000..1650ef7 --- /dev/null +++ b/core.go @@ -0,0 +1,66 @@ +// Package core provides a Wails v3 service with core utilities and helper functions. +// This is a starter service library that can be extended with additional functionality. +package core + +import ( + "fmt" +) + +// Version represents the current version of the service. +const Version = "0.1.0" + +// CoreService provides core utilities and helper functions as a Wails v3 service. +// This service can be registered with a Wails application and called from the frontend. +type CoreService struct { +} + +// NewCoreService creates a new CoreService instance. +func NewCoreService() *CoreService { + return &CoreService{} +} + +// ServiceName returns the name of the service. +// You should use the go module format e.g. github.com/myuser/myservice +func (s *CoreService) ServiceName() string { + return "github.com/Snider/Core" +} + +// GetVersion returns the current service version. +func (s *CoreService) GetVersion() string { + return Version +} + +// Greet returns a greeting message for the given name. +func (s *CoreService) Greet(name string) string { + return fmt.Sprintf("Hello, %s!", name) +} + +// Add adds two integers and returns the result. +func (s *CoreService) Add(a, b int) int { + return a + b +} + +// Multiply multiplies two integers and returns the result. +func (s *CoreService) Multiply(a, b int) int { + return a * b +} + +// Calculate performs a calculation based on the operation string. +// Supported operations: "add", "subtract", "multiply", "divide" +func (s *CoreService) Calculate(operation string, a, b int) (int, error) { + switch operation { + case "add": + return a + b, nil + case "subtract": + return a - b, nil + case "multiply": + return a * b, nil + case "divide": + if b == 0 { + return 0, fmt.Errorf("division by zero") + } + return a / b, nil + default: + return 0, fmt.Errorf("unknown operation: %s", operation) + } +} diff --git a/core_test.go b/core_test.go new file mode 100644 index 0000000..cf8ba5f --- /dev/null +++ b/core_test.go @@ -0,0 +1,265 @@ +package core + +import ( + "fmt" + "testing" +) + +func TestCoreService_Greet(t *testing.T) { + service := NewCoreService() + + tests := []struct { + name string + input string + expected string + }{ + { + name: "simple greeting", + input: "World", + expected: "Hello, World!", + }, + { + name: "greeting with name", + input: "Alice", + expected: "Hello, Alice!", + }, + { + name: "empty name", + input: "", + expected: "Hello, !", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + result := service.Greet(tt.input) + if result != tt.expected { + t.Errorf("expected %q, got %q", tt.expected, result) + } + }) + } +} + +func TestCoreService_GetVersion(t *testing.T) { + service := NewCoreService() + version := service.GetVersion() + if version == "" { + t.Error("expected non-empty version string") + } + if version != Version { + t.Errorf("expected version %q, got %q", Version, version) + } +} + +func TestCoreService_ServiceName(t *testing.T) { + service := NewCoreService() + name := service.ServiceName() + expectedName := "github.com/Snider/Core" + if name != expectedName { + t.Errorf("expected service name %q, got %q", expectedName, name) + } +} + +func TestCoreService_Add(t *testing.T) { + service := NewCoreService() + + tests := []struct { + name string + a int + b int + expected int + }{ + { + name: "positive numbers", + a: 2, + b: 3, + expected: 5, + }, + { + name: "negative numbers", + a: -5, + b: 3, + expected: -2, + }, + { + name: "zero values", + a: 0, + b: 0, + expected: 0, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + result := service.Add(tt.a, tt.b) + if result != tt.expected { + t.Errorf("Add(%d, %d) = %d; expected %d", tt.a, tt.b, result, tt.expected) + } + }) + } +} + +func TestCoreService_Multiply(t *testing.T) { + service := NewCoreService() + + tests := []struct { + name string + a int + b int + expected int + }{ + { + name: "positive numbers", + a: 2, + b: 3, + expected: 6, + }, + { + name: "negative and positive", + a: -5, + b: 3, + expected: -15, + }, + { + name: "multiplication by zero", + a: 5, + b: 0, + expected: 0, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + result := service.Multiply(tt.a, tt.b) + if result != tt.expected { + t.Errorf("Multiply(%d, %d) = %d; expected %d", tt.a, tt.b, result, tt.expected) + } + }) + } +} + +func TestCoreService_Calculate(t *testing.T) { + service := NewCoreService() + + tests := []struct { + name string + operation string + a int + b int + expected int + wantErr bool + }{ + { + name: "add operation", + operation: "add", + a: 10, + b: 5, + expected: 15, + wantErr: false, + }, + { + name: "subtract operation", + operation: "subtract", + a: 10, + b: 5, + expected: 5, + wantErr: false, + }, + { + name: "multiply operation", + operation: "multiply", + a: 10, + b: 5, + expected: 50, + wantErr: false, + }, + { + name: "divide operation", + operation: "divide", + a: 10, + b: 5, + expected: 2, + wantErr: false, + }, + { + name: "divide by zero", + operation: "divide", + a: 10, + b: 0, + expected: 0, + wantErr: true, + }, + { + name: "unknown operation", + operation: "modulo", + a: 10, + b: 5, + expected: 0, + wantErr: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + result, err := service.Calculate(tt.operation, tt.a, tt.b) + if (err != nil) != tt.wantErr { + t.Errorf("Calculate() error = %v, wantErr %v", err, tt.wantErr) + return + } + if !tt.wantErr && result != tt.expected { + t.Errorf("Calculate(%q, %d, %d) = %d; expected %d", tt.operation, tt.a, tt.b, result, tt.expected) + } + }) + } +} + +// Benchmark tests +func BenchmarkCoreService_Greet(b *testing.B) { + service := NewCoreService() + for i := 0; i < b.N; i++ { + _ = service.Greet("World") + } +} + +func BenchmarkCoreService_Add(b *testing.B) { + service := NewCoreService() + for i := 0; i < b.N; i++ { + _ = service.Add(42, 24) + } +} + +func BenchmarkCoreService_Multiply(b *testing.B) { + service := NewCoreService() + for i := 0; i < b.N; i++ { + _ = service.Multiply(42, 24) + } +} + +func BenchmarkCoreService_Calculate(b *testing.B) { + service := NewCoreService() + for i := 0; i < b.N; i++ { + _, _ = service.Calculate("add", 42, 24) + } +} + +// Example tests +func ExampleCoreService_Greet() { + service := NewCoreService() + greeting := service.Greet("World") + fmt.Println(greeting) + // Output: Hello, World! +} + +func ExampleCoreService_Add() { + service := NewCoreService() + result := service.Add(2, 3) + fmt.Println(result) + // Output: 5 +} + +func ExampleCoreService_Calculate() { + service := NewCoreService() + result, _ := service.Calculate("multiply", 6, 7) + fmt.Println(result) + // Output: 42 +} diff --git a/examples/demo.go b/examples/demo.go new file mode 100644 index 0000000..0b96e76 --- /dev/null +++ b/examples/demo.go @@ -0,0 +1,72 @@ +package main + +import ( + "fmt" + + "github.com/Snider/Core" +) + +func main() { + // Create the Core service + coreService := core.NewCoreService() + + // Display service information + fmt.Printf("Service: %s\n", coreService.ServiceName()) + fmt.Printf("Version: %s\n\n", coreService.GetVersion()) + + // Demonstrate service methods + fmt.Println("=== Core Service Demo ===\n") + + // Test Greet + fmt.Println("1. Greeting:") + fmt.Printf(" Greet('Wails Developer'): %s\n", coreService.Greet("Wails Developer")) + fmt.Printf(" Greet('Go Programmer'): %s\n\n", coreService.Greet("Go Programmer")) + + // Test Add + fmt.Println("2. Addition:") + fmt.Printf(" Add(15, 27): %d\n", coreService.Add(15, 27)) + fmt.Printf(" Add(100, 200): %d\n\n", coreService.Add(100, 200)) + + // Test Multiply + fmt.Println("3. Multiplication:") + fmt.Printf(" Multiply(8, 9): %d\n", coreService.Multiply(8, 9)) + fmt.Printf(" Multiply(12, 12): %d\n\n", coreService.Multiply(12, 12)) + + // Test Calculate with various operations + fmt.Println("4. Calculator:") + operations := []struct { + op string + a int + b int + }{ + {"add", 10, 5}, + {"subtract", 20, 8}, + {"multiply", 7, 6}, + {"divide", 100, 4}, + } + + for _, test := range operations { + result, err := coreService.Calculate(test.op, test.a, test.b) + if err != nil { + fmt.Printf(" Calculate('%s', %d, %d): Error - %v\n", test.op, test.a, test.b, err) + } else { + fmt.Printf(" Calculate('%s', %d, %d): %d\n", test.op, test.a, test.b, result) + } + } + + // Test error handling + fmt.Println("\n5. Error Handling:") + _, err := coreService.Calculate("divide", 10, 0) + if err != nil { + fmt.Printf(" Calculate('divide', 10, 0): Error - %v โœ“\n", err) + } + + _, err = coreService.Calculate("modulo", 10, 3) + if err != nil { + fmt.Printf(" Calculate('modulo', 10, 3): Error - %v โœ“\n", err) + } + + fmt.Println("\n=== Demo Complete ===") + fmt.Println("\nThis service can be integrated into any Wails v3 application!") + fmt.Println("For a full UI example, see examples/main.go (requires Wails v3 with UI support)") +} diff --git a/examples/frontend/index.html b/examples/frontend/index.html new file mode 100644 index 0000000..4370675 --- /dev/null +++ b/examples/frontend/index.html @@ -0,0 +1,230 @@ + + + + + + Core Service Example + + + +
+

๐Ÿš€ Core Service

+
Loading version...
+ +
+

๐Ÿ‘‹ Greeting

+
+ + +
+ +
+
+ +
+

๐Ÿงฎ Calculator

+
+ + +
+
+
+ + +
+
+ + +
+
+ +
+
+
+ + + + diff --git a/examples/main.go b/examples/main.go new file mode 100644 index 0000000..e29ee46 --- /dev/null +++ b/examples/main.go @@ -0,0 +1,71 @@ +package main + +import ( + "embed" + "fmt" + "log" + + "github.com/Snider/Core" + "github.com/wailsapp/wails/v3/pkg/application" +) + +// Embed a basic index.html for the example +//go:embed frontend/index.html +var assets embed.FS + +func main() { + // Create the Core service + coreService := core.NewCoreService() + + // Display service information + fmt.Printf("Service: %s\n", coreService.ServiceName()) + fmt.Printf("Version: %s\n\n", coreService.GetVersion()) + + // Demonstrate service methods locally (without Wails UI) + fmt.Println("=== Local Service Demo ===") + fmt.Println("Greet('Wails Developer'):", coreService.Greet("Wails Developer")) + fmt.Println("Add(15, 27):", coreService.Add(15, 27)) + fmt.Println("Multiply(8, 9):", coreService.Multiply(8, 9)) + + result, err := coreService.Calculate("divide", 100, 4) + if err != nil { + fmt.Printf("Calculate error: %v\n", err) + } else { + fmt.Printf("Calculate('divide', 100, 4): %d\n", result) + } + fmt.Println() + + // Create a Wails application with the Core service + fmt.Println("=== Starting Wails Application ===") + fmt.Println("The Core service is now available to the frontend!") + fmt.Println("Open the application window to interact with the service.") + fmt.Println() + + app := application.New(application.Options{ + Name: "Core Service Example", + Description: "Example Wails v3 application using the Core service", + Services: []application.Service{ + application.NewService(coreService), + }, + Assets: application.AssetOptions{ + Handler: application.AssetFileServerFS(assets), + }, + Mac: application.MacOptions{ + ApplicationShouldTerminateAfterLastWindowClosed: true, + }, + }) + + // Create application window + app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{ + Title: "Core Service Example", + Width: 800, + Height: 600, + URL: "/frontend/index.html", + }) + + // Run the application + err = app.Run() + if err != nil { + log.Fatal(err) + } +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..4260166 --- /dev/null +++ b/go.mod @@ -0,0 +1,48 @@ +module github.com/Snider/Core + +go 1.24.7 + +require github.com/wailsapp/wails/v3 v3.0.0-alpha.36 + +require ( + dario.cat/mergo v1.0.1 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect + github.com/ProtonMail/go-crypto v1.1.6 // indirect + github.com/adrg/xdg v0.5.3 // indirect + github.com/bep/debounce v1.2.1 // indirect + github.com/cloudflare/circl v1.6.0 // indirect + github.com/cyphar/filepath-securejoin v0.4.1 // indirect + github.com/ebitengine/purego v0.8.2 // indirect + github.com/emirpasic/gods v1.18.1 // indirect + github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect + github.com/go-git/go-billy/v5 v5.6.2 // indirect + github.com/go-git/go-git/v5 v5.13.2 // indirect + github.com/go-ole/go-ole v1.3.0 // indirect + github.com/godbus/dbus/v5 v5.1.0 // indirect + github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect + github.com/google/uuid v1.6.0 // indirect + github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect + github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e // indirect + github.com/kevinburke/ssh_config v1.2.0 // indirect + github.com/leaanthony/go-ansi-parser v1.6.1 // indirect + github.com/leaanthony/u v1.1.1 // indirect + github.com/lmittmann/tint v1.0.7 // indirect + github.com/mattn/go-colorable v0.1.14 // indirect + github.com/mattn/go-isatty v0.0.20 // indirect + github.com/pjbgf/sha1cd v0.3.2 // indirect + github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect + github.com/pkg/errors v0.9.1 // indirect + github.com/rivo/uniseg v0.4.7 // indirect + github.com/samber/lo v1.49.1 // indirect + github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect + github.com/skeema/knownhosts v1.3.1 // indirect + github.com/wailsapp/go-webview2 v1.0.22 // indirect + github.com/wailsapp/mimetype v1.4.1 // indirect + github.com/xanzy/ssh-agent v0.3.3 // indirect + golang.org/x/crypto v0.36.0 // indirect + golang.org/x/net v0.37.0 // indirect + golang.org/x/sys v0.31.0 // indirect + golang.org/x/text v0.23.0 // indirect + gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/warnings.v0 v0.1.2 // indirect +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..a2a38bc --- /dev/null +++ b/go.sum @@ -0,0 +1,148 @@ +dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= +dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= +github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.2 h1:F2VQgta7ecxGYO8k3ZZz3RS8fVIXVxONVUPlNERoyfY= +github.com/Microsoft/go-winio v0.6.2/go.mod h1:yd8OoFMLzJbo9gZq8j5qaps8bJ9aShtEA8Ipt1oGCvU= +github.com/ProtonMail/go-crypto v1.1.6 h1:ZcV+Ropw6Qn0AX9brlQLAUXfqLBc7Bl+f/DmNxpLfdw= +github.com/ProtonMail/go-crypto v1.1.6/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= +github.com/adrg/xdg v0.5.3 h1:xRnxJXne7+oWDatRhR1JLnvuccuIeCoBu2rtuLqQB78= +github.com/adrg/xdg v0.5.3/go.mod h1:nlTsY+NNiCBGCK2tpm09vRqfVzrc2fLmXGpBLF0zlTQ= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= +github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be/go.mod h1:ySMOLuWl6zY27l47sB3qLNK6tF2fkHG55UZxx8oIVo4= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= +github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= +github.com/bep/debounce v1.2.1 h1:v67fRdBA9UQu2NhLFXrSg0Brw7CexQekrBwDMM8bzeY= +github.com/bep/debounce v1.2.1/go.mod h1:H8yggRPQKLUhUoqrJC1bO2xNya7vanpDl7xR3ISbCJ0= +github.com/cloudflare/circl v1.6.0 h1:cr5JKic4HI+LkINy2lg3W2jF8sHCVTBncJr5gIIq7qk= +github.com/cloudflare/circl v1.6.0/go.mod h1:uddAzsPgqdMAYatqJ0lsjX1oECcQLIlRpzZh3pJrofs= +github.com/cyphar/filepath-securejoin v0.4.1 h1:JyxxyPEaktOD+GAnqIqTf9A8tHyAG22rowi7HkoSU1s= +github.com/cyphar/filepath-securejoin v0.4.1/go.mod h1:Sdj7gXlvMcPZsbhwhQ33GguGLDGQL7h7bg04C/+u9jI= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/ebitengine/purego v0.8.2 h1:jPPGWs2sZ1UgOSgD2bClL0MJIqu58nOmIcBuXr62z1I= +github.com/ebitengine/purego v0.8.2/go.mod h1:iIjxzd6CiRiOG0UyXP+V1+jWqUXVjPKLAI0mRfJZTmQ= +github.com/elazarl/goproxy v1.4.0 h1:4GyuSbFa+s26+3rmYNSuUVsx+HgPrV1bk1jXI0l9wjM= +github.com/elazarl/goproxy v1.4.0/go.mod h1:X/5W/t+gzDyLfHW4DrMdpjqYjpXsURlBt9lpBDxZZZQ= +github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= +github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= +github.com/gliderlabs/ssh v0.3.8 h1:a4YXD1V7xMF9g5nTkdfnja3Sxy1PVDCj1Zg4Wb8vY6c= +github.com/gliderlabs/ssh v0.3.8/go.mod h1:xYoytBv1sV0aL3CavoDuJIQNURXkkfPA/wxQ1pL1fAU= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= +github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= +github.com/go-git/go-billy/v5 v5.6.2 h1:6Q86EsPXMa7c3YZ3aLAQsMA0VlWmy43r6FHqa/UNbRM= +github.com/go-git/go-billy/v5 v5.6.2/go.mod h1:rcFC2rAsp/erv7CMz9GczHcuD0D32fWzH+MJAU+jaUU= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399 h1:eMje31YglSBqCdIqdhKBW8lokaMrL3uTkpGYlE2OOT4= +github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20231010084843-55a94097c399/go.mod h1:1OCfN199q1Jm3HZlxleg+Dw/mwps2Wbk9frAWm+4FII= +github.com/go-git/go-git/v5 v5.13.2 h1:7O7xvsK7K+rZPKW6AQR1YyNhfywkv7B8/FsP3ki6Zv0= +github.com/go-git/go-git/v5 v5.13.2/go.mod h1:hWdW5P4YZRjmpGHwRH2v3zkWcNl6HeXaXQEMGb3NJ9A= +github.com/go-ole/go-ole v1.3.0 h1:Dt6ye7+vXGIKZ7Xtk4s6/xVdGDQynvom7xCFEdWr6uE= +github.com/go-ole/go-ole v1.3.0/go.mod h1:5LS6F96DhAwUc7C+1HLexzMXY1xGRSryjyPPKW6zv78= +github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= +github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 h1:f+oWsMOmNPc8JmEHVZIycC7hBoQxHH9pNKQORJNozsQ= +github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8/go.mod h1:wcDNUvekVysuuOpQKo3191zZyTpiI6se1N1ULghS0sw= +github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8= +github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU= +github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= +github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= +github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= +github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e h1:Q3+PugElBCf4PFpxhErSzU3/PY5sFL5Z6rfv4AbGAck= +github.com/jchv/go-winloader v0.0.0-20210711035445-715c2860da7e/go.mod h1:alcuEEnZsY1WQsagKhZDsoPCRoOijYqhZvPwLG0kzVs= +github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= +github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= +github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leaanthony/go-ansi-parser v1.6.1 h1:xd8bzARK3dErqkPFtoF9F3/HgN8UQk0ed1YDKpEz01A= +github.com/leaanthony/go-ansi-parser v1.6.1/go.mod h1:+vva/2y4alzVmmIEpk9QDhA7vLC5zKDTRwfZGOp3IWU= +github.com/leaanthony/u v1.1.1 h1:TUFjwDGlNX+WuwVEzDqQwC2lOv0P4uhTQw7CMFdiK7M= +github.com/leaanthony/u v1.1.1/go.mod h1:9+o6hejoRljvZ3BzdYlVL0JYCwtnAsVuN9pVTQcaRfI= +github.com/lmittmann/tint v1.0.7 h1:D/0OqWZ0YOGZ6AyC+5Y2kD8PBEzBk6rFHVSfOqCkF9Y= +github.com/lmittmann/tint v1.0.7/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE= +github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= +github.com/matryer/is v1.4.1 h1:55ehd8zaGABKLXQUe2awZ99BD/PTc2ls+KV/dXphgEQ= +github.com/matryer/is v1.4.1/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU= +github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE= +github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= +github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= +github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= +github.com/onsi/gomega v1.34.1 h1:EUMJIKUjM8sKjYbtxQI9A4z2o+rruxnzNvpknOXie6k= +github.com/onsi/gomega v1.34.1/go.mod h1:kU1QgUvBDLXBJq618Xvm2LUX6rSAfRaFRTcdOeDLwwY= +github.com/pjbgf/sha1cd v0.3.2 h1:a9wb0bp1oC2TGwStyn0Umc/IGKQnEgF0vVaZ8QF8eo4= +github.com/pjbgf/sha1cd v0.3.2/go.mod h1:zQWigSxVmsHEZow5qaLtPYxpcKMMQpa09ixqBxuCS6A= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c h1:+mdjkGKdHQG3305AYmdv1U2eRNDiU2ErMBj1gwrq8eQ= +github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c/go.mod h1:7rwL4CYBLnjLxUqIJNnCWiEdr3bn6IUYi15bNlnbCCU= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= +github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= +github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= +github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= +github.com/samber/lo v1.49.1 h1:4BIFyVfuQSEpluc7Fua+j1NolZHiEHEpaSEKdsH0tew= +github.com/samber/lo v1.49.1/go.mod h1:dO6KHFzUKXgP8LDhU0oI8d2hekjXnGOu0DB8Jecxd6o= +github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 h1:n661drycOFuPLCN3Uc8sB6B/s6Z4t2xvBgU1htSHuq8= +github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3/go.mod h1:A0bzQcvG0E7Rwjx0REVgAGH58e96+X0MeOfepqsbeW4= +github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/skeema/knownhosts v1.3.1 h1:X2osQ+RAjK76shCbvhHHHVl3ZlgDm8apHEHFqRjnBY8= +github.com/skeema/knownhosts v1.3.1/go.mod h1:r7KTdC8l4uxWRyK2TpQZ/1o5HaSzh06ePQNxPwTcfiY= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= +github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/wailsapp/go-webview2 v1.0.22 h1:YT61F5lj+GGaat5OB96Aa3b4QA+mybD0Ggq6NZijQ58= +github.com/wailsapp/go-webview2 v1.0.22/go.mod h1:qJmWAmAmaniuKGZPWwne+uor3AHMB5PFhqiK0Bbj8kc= +github.com/wailsapp/mimetype v1.4.1 h1:pQN9ycO7uo4vsUUuPeHEYoUkLVkaRntMnHJxVwYhwHs= +github.com/wailsapp/mimetype v1.4.1/go.mod h1:9aV5k31bBOv5z6u+QP8TltzvNGJPmNJD4XlAL3U+j3o= +github.com/wailsapp/wails/v3 v3.0.0-alpha.36 h1:GQ8vSrFgafITwMd/p4k+WBjG9K/anma9Pk2eJ/5CLsI= +github.com/wailsapp/wails/v3 v3.0.0-alpha.36/go.mod h1:7i8tSuA74q97zZ5qEJlcVZdnO+IR7LT2KU8UpzYMPsw= +github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= +github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.36.0 h1:AnAEvhDddvBdpY+uR+MyHmuZzzNqXSe/GvuDeob5L34= +golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= +golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac h1:l5+whBCLH3iH2ZNHYLbAe58bo7yrN4mVcnkHDYz5vvs= +golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac/go.mod h1:hH+7mtFmImwwcMvScyxUhjuVHR3HGaDPMn9rMSUUbxo= +golang.org/x/net v0.0.0-20210505024714-0287a6fb4125/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.37.0 h1:1zLorHbz+LYj7MQlSf1+2tPIIgibq2eL5xkrGk6f+2c= +golang.org/x/net v0.37.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200810151505-1b9f1253b3ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.31.0 h1:ioabZlmFYtWhL+TRYpcnNlLwhyxaM9kWTDEmfnprqik= +golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.30.0 h1:PQ39fJZ+mfadBm0y5WlL4vlM7Sx1Hgf13sMIY2+QS9Y= +golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.23.0 h1:D71I7dUrlY+VX0gQShAThNGHFxZ13dGLBHQLVl1mJlY= +golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= +gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= +gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= +gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=