cmd

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Check = gcmd.Command{
		Name:  "check",
		Usage: "check",
		Brief: "check",
		Func: func(ctx context.Context, parser *gcmd.Parser) (err error) {
			g.Log().Debug(ctx, "Check ~~~~~~~~~~~~~~~~~")
			_, err = g.Redis().Do(ctx, "HSET", "test", "id", 10000)

			if err != nil {
				panic(err)
			}

			redis := gins.Redis()
			redis.Do(ctx, "HSET", "test2", "id", 10000)

			println(gdebug.Caller())
			g.Redis()
			return
		},
	}
)
View Source
var (
	Main = gcmd.Command{
		Name:  "main",
		Usage: "main",
		Brief: "start http server",
		Func: func(ctx context.Context, parser *gcmd.Parser) (err error) {

			if cool.IsRedisMode {
				go cool.ListenFunc(ctx)
			}

			s := g.Server()

			s.Run()
			return nil
		},
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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