goatcore

package module
v0.0.0-...-a532a67 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: LGPL-3.0 Imports: 0 Imported by: 0

README

GoatCore

Go Report Card GoDoc

GoatCore is the main project contains dump functions, primitives and base/independent libraries. It includes interfaces, packages, dependency injection system, base application architecture and external modules like terminal, pipelines commands etc.

Structure

  • app/* - contains application architecture
  • dependency/* - contains dependency injection libraries
  • filesystem/* - contains filesystem interfaces and accessor for virtual and operating system filesystem
  • goathtml/* - contains loader and provider for HTML template (it separate layout views, helpers and layout)
  • goatmail/* - SMTP (Simple Mail Transfer Protocol) client
  • goattext/* - contains loader and provider for plain text template (it separate layout views, helpers and layout)
  • i18n/* - provide internationalization libraries
  • messages/* - contains forms messages wrapper
  • repositories/* - contains libraries for VCS (Version Control System). The git is partly covered now.
  • testbase/* - contains test helpers
  • workers/* - base library to support your concurrency programming

Tests

Concurrency tests accuracy

Improve test execution time by set AsyncTestReapeat (at workers/main.go) to lower value (like 200 or 500). Tests will less-restrictive but faster. Increase AsyncTestReapeat to improve test accuracy.

Run tests

Define the system environment to tests runs.

  • GOATCORE_TEST_SMTP_FROM_ADDRESS - sender email
  • GOATCORE_TEST_SMTP_TO_ADDRESS - reciver email
  • GOATCORE_TEST_SMTP_SERVER - SMTP server URL (like smtp.gmail.com:465)
  • GOATCORE_TEST_SMTP_USERNAME - SMTP server username
  • GOATCORE_TEST_SMTP_PASSWORD - SMTP server password
  • GOATCORE_TEST_SMTP_IDENTITY - SMTP server identity
  • GOATCORE_TEST_DOCKER - Run docker tests if defined and equals to "YES". The tests require docker daemon started.

On Linux/Unix/macOS add environment variables and run go tests by terminal.

export GOATCORE_TEST_SMTP_FROM_ADDRESS="test@email.com"
export GOATCORE_TEST_SMTP_TO_ADDRESS="test@email.com"
export GOATCORE_TEST_SMTP_SERVER="smtp.gmail.com:465"
export GOATCORE_TEST_SMTP_USERNAME="YOUR_TEST_USER"
export GOATCORE_TEST_SMTP_PASSWORD="YOUR_TEST_USER_PASSWORD"
export GOATCORE_TEST_SMTP_IDENTITY=""
export GOATCORE_TEST_DOCKER="YES"
go test ./...

Tips&Tricks

Build library once

To build library "once" you can run:

go install -a github.com/goatcms/goatcore

This command install the package into your $GOPATH. It can be source of side effects. Your library version won't be update automatically. The pre-installed version is installed under $GOPATH/pkg/

You can use the trick to pre-build heavy libraries like go-sqlite3.

go install -a github.com/mattn/go-sqlite3

External sources

In English

In progress

In Polish

Documentation

Index

Constants

View Source
const (
	// Version is library version
	Version = "0.0.0dx"
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
app
gio
modules/ocm
Package ocm provide Open Container middleware Open Container Initiative The Open Container Initiative is an open governance structure for the express purpose of creating open industry standards around container formats and runtimes.
Package ocm provide Open Container middleware Open Container Initiative The Open Container Initiative is an open governance structure for the express purpose of creating open industry standards around container formats and runtimes.
http
git
plainmap
Package plainmap provides primitives for convert types to plainmap.
Package plainmap provides primitives for convert types to plainmap.
r

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL