Giter Site home page Giter Site logo

gogogo's Introduction

gogogo

app

A simple web framework compatible with net/http.

It also has a predefined 'standard' app engine server called GoEngine accessible through helper functions Handle, Server and so on.

func A(c *Context) error {
	c.JSON([]byte("a"))
	return nil
}

func main() {
    app.Handle("/", &app.Got{A})
    
    l, err := net.Listen("tcp", ":"+port)
    if err != nil {
        logger.Errorf("Listen: %v", err)
        return
    }
    app.Serve(l)
}

A example site: Cyeam.

logger

A logger package that compatible with sdk log package. It supports level logging and file auto rotating.

It also has a predefined 'standard' Logger called StdLogger accessible through helper functions Debug[f], Info[f], Warn[f], Error[f], LogLevel and SetJack.

It supports 4 level:

LevelError = iota
LevelWarning
LevelInformational
LevelDebug

You can use LogLevel to handle the log level.

File rotating based on package gopkg.in/natefinch/lumberjack.v2, you can control file settings by using SetJack.

Quick start

import "github.com/mnhkahn/gogogo/logger"

logger.Info("hello, world.")

Defined our own logger:

l := logger.NewWriterLogger(w, flag, 3)
l.Info("hello, world")

For more information, goto godoc.

Chinese details, goto link.

panicer

A help package that catch panic error and print the panic stack.

Quick start

import "github.com/mnhkahn/gogogo/panicer"

func main() {
	defer Recover()
}

For more information, goto godoc https://godoc.org/github.com/mnhkahn/gogogo/panicer

util

A util package collection.

For more information, goto godoc https://godoc.org/github.com/mnhkahn/gogogo/util

Chinese details, goto http://blog.cyeam.com//golang/2018/08/27/retry?utm_source=github

gogogo's People

Contributors

mnhkahn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gogogo's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.