Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/goatcms/goat-core

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/goatcms/goat-core

  • v0.0.0-20210515194956-7f0034b9aa29
  • Source
  • Go
  • Socket score

Version published
Created
Source

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

FAQs

Package last updated on 15 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc