Go Community Linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Go community here or just enjoy what everyone else has found!


How to Deploy GoBuffalo on Google's App Engine

Hey there,

If you use Buffalo and would like to deploy it to Google's App Engine, please visit this tutorial to find out more:

Deploy GoBuffalo on Google's App Engine

 Tomislav Biscan


ANNOUNCEMENT: Golangflow

Hello,

Just a friendly reminder as the maintainer of this site, that our twitter integration is offline as Google recently discontinued the Google link service. We are transitioning to Firebase Dynamic links later this week. Also, posts will start to be moderated to ensure we deliver relevant and useful content to our Golang readers.

Thank you

Any questions email: feedback @ golangflow.io

 Brian Scott


Social Media Marketing Agency

TokyoTechie is the leading Social Media Marketing Agency, We are also work in Digital Marketing Agency, Web Development & Software Development Services. We have experts team for the work who provides 24/7 service. We also focus on Cryptocurrency exchange, Digital Currency Development, Android, IOS Development, e-commerce, Game Development, Digital Marketing, SEO, Dapps Development Agency, Hedera Hashgraph Development Company etc.

please visit: https://tokyotechie.com/social-media-seo/

 


Best SEO Company

TokyoTechie is the leading SEO Agency, We are also work in Digital Marketing Agency, Web Development & Software Development Services. We have experts team for the work who provides 24/7 service. We also focus on Cryptocurrency exchange, Digital Currency Development, Android, IOS Development, e-commerce, Game Development, Digital Marketing, SEO, Dapps Development Agency, Hedera Hashgraph Development Company etc.

please visit: https://tokyotechie.com/seo-company/

 


Blockchain in Supply Chain Logistics

TokyoTechie is the leading Blockchain in Supply Chain Logistics, We are also work in Digital Marketing Agency, Web Development & Software Development Services. We have experts team for the work who provides 24/7 service. We also focus on Cryptocurrency exchange, Digital Currency Development, Android, IOS Development, e-commerce, Game Development, Digital Marketing, SEO, Dapps Development Agency, Hedera Hashgraph Development Company etc.

please visit: https://tokyotechie.com/blockchain-supplychain-logistics/

 


Blockchain In Diamond Industry

TokyoTechie is the leading SEO Agency, We are also work in Digital Marketing Agency, Web Development & Software Development Services. We have experts team for the work who provides 24/7 service. We also focus on Cryptocurrency exchange, Digital Currency Development, Android, IOS Development, e-commerce, Game Development, Digital Marketing, SEO, Dapps Development Agency, Hedera Hashgraph Development Company etc.

please visit: https://tokyotechie.com/blockchain-diamond-industry/

 


Real Estate Blockchain Platform

TokyoTechie is the leading Real Estate Blockchain Platform, We are also work in Digital Marketing Agency, Web Development & Software Development Services. We have experts team for the work who provides 24/7 service. We also focus on Cryptocurrency exchange, Digital Currency Development, Android, IOS Development, e-commerce, Game Development, Digital Marketing, SEO, Dapps Development Agency, Hedera Hashgraph Development Company etc.

please visit: https://tokyotechie.com/blockchain-real-estate/

 


Blockchain in Insurance Industry

TokyoTechie is the leading Blockchain in Insurance Industry, We are also work in Digital Marketing Agency, Web Development & Software Development Services. We have experts team for the work who provides 24/7 service. We also focus on Cryptocurrency exchange, Digital Currency Development, Android, IOS Development, e-commerce, Game Development, Digital Marketing, SEO, Dapps Development Agency, Hedera Hashgraph Development Company etc.

please visit: https://tokyotechie.com/blockchain-insurance/

 


Blockchain Technology in Healthcare Industry

TokyoTechie is the leading Blockchain Technology in Healthcare Industry, We are also work in Digital Marketing Agency, Web Development & Software Development Services. We have experts team for the work who provides 24/7 service. We also focus on Cryptocurrency exchange, Digital Currency Development, Android, IOS Development, e-commerce, Game Development, Digital Marketing, SEO, Dapps Development Agency, Hedera Hashgraph Development Company etc.

please visit: https://tokyotechie.com/blockchain-healthcare/

 


Generis, a versatile code generator adding generics, free-form macros, conditional compilation, HTML templating and Allman style conversion to the Go language

Just to inform you that I’ve just released a first version of Generis, a lightweight code preprocessor adding the following features to the Go language :

  • Generics.
  • Free-form macros.
  • Conditional compilation.
  • HTML templating.
  • Allman style conversion.

https://github.com/senselogic/GENERIS

It’s similar in function to both Ego and Genny, but implemented as a free-form C++ like preprocessor.

Sample :

package main;

// -- IMPORTS

import (
    "html"
    "io"
    "log"
    "net/http"
    "strconv"
    );

// -- DEFINITIONS

#define DebugMode
#as true

// ~~

#define HttpPort
#as 8080

// ~~

#define WriteLine( {{text}} )
#as log.Println( {{text}} )

// ~~

#define local {{variable}} : {{type}};
#as var {{variable}} {{type}};

// ~~

#define DeclareStack( {{type}}, {{name}} )
#as
    // -- TYPES

    type {{name}}Stack struct
    {
        ElementArray []{{type}};
    }

    // -- INQUIRIES

    func ( stack * {{name}}Stack ) IsEmpty(
        ) bool
    {
        return len( stack.ElementArray ) == 0;
    }

    // -- OPERATIONS

    func ( stack * {{name}}Stack ) Push(
        element {{type}}
        )
    {
        stack.ElementArray = append( stack.ElementArray, element );
    }

    // ~~

    func ( stack * {{name}}Stack ) Pop(
        ) {{type}}
    {
        local
            element : {{type}};

        element = stack.ElementArray[ len( stack.ElementArray ) - 1 ];

        stack.ElementArray = stack.ElementArray[ : len( stack.ElementArray ) - 1 ];

        return element;
    }
#end

// ~~

#define DeclareStack( {{type}} )
#as DeclareStack( {{type}}, {{type:PascalCase}} )

// -- TYPES

DeclareStack( string )
DeclareStack( int32 )

// -- FUNCTIONS

func HandleRootPage(
    response_writer http.ResponseWriter,
    request * http.Request
    )
{
    local
        boolean : bool;
    local
        natural : uint;
    local
        integer : int;
    local
        real : float64;
    local
        escaped_text,
        text : string;
    local
        integer_stack : Int32Stack;

    boolean = true;
    natural = 10;
    integer = 20;
    real = 30.0;
    text = "text";
    escaped_text = "<escaped text/>";

    integer_stack.Push( 10 );
    integer_stack.Push( 20 );
    integer_stack.Push( 30 );

    #write response_writer
        <!DOCTYPE html>
        <html lang="en">
            <head>
                <meta charset="utf-8">
                <title><%= request.URL.Path %></title>
            </head>
            <body>
                <% if ( boolean ) { %>
                    <%= "URL : " + request.URL.Path %>
                    <br/>
                    <%@ natural %>
                    <%# integer %>
                    <%& real %>
                    <br/>
                    <%~ text %>
                    <%= escaped_text %>
                    <%= "<%% ignored %%>" %>
                    <%% ignored %%>
                <% } %>
                <br/>
                Stack :
                <br/>
                <% for !integer_stack.IsEmpty() { %>
                    <%# integer_stack.Pop() %>
                <% } %>
            </body>
        </html>
    #end
}

// ~~

func main()
{
    http.HandleFunc( "/", HandleRootPage );

    #if DebugMode
        WriteLine( "Listening on http://localhost:HttpPort" );
    #end

    log.Fatal(
        http.ListenAndServe( ":HttpPort", nil )
        );
}
 SenseLogic


Go config management. support JSON, YAML, TOML, INI, HCL, ENV and Flags

gookit/config - Go config management. support JSON, YAML, TOML, INI, HCL, ENV and Flags. Multi file load, data override merge, parse ENV var.

Features

  • Support multi format: JSON(default), INI, YAML, TOML, HCL
    • JSON content support comments. will auto clear comments
  • Support multi-file and multi-data loading
  • Support loading configuration from os ENV
  • Support for loading configuration data from remote URLs
  • Support for setting configuration data from command line arguments(flags)
  • Support data overlay and merge, automatically load by key when loading multiple copies of data
  • Support get sub value by path, like map.key arr.2
  • Support parse ENV name. like envKey: ${SHELL} -> envKey: /bin/zsh
  • Generic api Get Int Uint Int64 Float String Bool Ints IntMap Strings StringMap ...
  • Complete unit test(code coverage > 95%)

Provide a sub-package dotenv that supports importing data from files (eg .env) to ENV

Github Repo

 Inhere


txeh: Go library and CLI utilty for /etc/hosts management. @cjimti

txeh is a golang library and command line utility for working with /etc/hosts.

A computer's /etc/hosts file is a powerful utility for developers and system administrators to create localized, custom DNS entries. This small go library and utility were developed to encapsulate the complexity of working with /etc/hosts directly by providing a simple interface for adding and removing entries in a /etc/hosts file.

https://github.com/txn2/txeh

 Craig Johnston


Manage test dependencies with Go

Analogue to testing that a window can be opened in a house, you don't want to spend time building the house first. Instead you want to say: I need a house with a window and then you test the opening functionality. This is the approach we took with our framework for setting up objects to be tested using recipes, ingredients and special preparation (if needed).

https://developers.redhat.com/blog/2017/09/19/manage-test-dependencies-go/

 Konrad Kleine


Store and interact with go structs efficiently in Redis using go-rejson #redis #go #json

https://github.com/nitishm/go-rejson

Instead of saving structs as json strings, use redislabs' ReJSON module with Redis Server to interact natively with JSON objects

ReJSON is a Redis module that implements ECMA-404 The JSON Data Interchange Standard as a native data type. It allows storing, updating and fetching JSON values from Redis keys (documents).

Go-ReJSON is the only go client library that supports both redigo and go-redis clients, and plans to support more redis Go clients in the future.

PRs are welcome !

 Nitish Malhotra


An HTTP server implementation of vegeta, a load-testing tool, written in Go. #golang #load-testing #programming

I am looking for contributors to help me out with my latest project.

I am creating an HTTP server implementation, driven by a REST API, for the https://github.com/tsenart/vegeta load testing tool. Currently it is only available as a CLI tool. However, there is an excellent library provided by the author, which is used by the CLI tool.

The idea is to create a tool, using vegeta, which is similar to https://github.com/loadimpact/k6 or https://github.com/locustio/locust complete with a UI (frontend). This makes it possible to use this tool in a more distributed manner, and possibly introduce it as a kubernetes native load-testing tool.

The project is available at https://github.com/nitishm/vegeta-server and currently supports submitting/viewing/canceling attacks (all options are not implemented, yet) and viewing the attack reports.

Issues are tagged with appropriate labels.

 Nitish Malhotra