strategy

package
v1.65.2 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2021 License: BSD-3-Clause Imports: 16 Imported by: 4

Documentation

Overview

Package strategy 实现开发者工具实现不同策略的功能

Index

Constants

View Source
const (
	// 創建main.go的文件模板
	CpftMainGo = `` /* 256-byte string literal not displayed */

	// 生成的配置文件模板 xxx.toml
	CpftCfgToml = `` /* 1464-byte string literal not displayed */

	CpftRunmainBlock = `package main

var ${PROJECTNAME} = `

	// 生成项目运行主程序的模板 xxx.go
	// 顶部还需要加上package main
	//var bityuan = `CPFT_RUNMAIN`
	CpftRunMain = `` /* 3346-byte string literal not displayed */

	// 生成项目Makefile文件的模板 Makefile
	CpftMakefile = `` /* 1215-byte string literal not displayed */

	// 生成 .travis.yml 文件模板
	CpftTravisYml = `
language: go

go:
  - "1.9"
  - master
`

	// 生成 plugin/plugin.toml的文件模板
	CpftPluginToml = `` /* 626-byte string literal not displayed */

	// 项目 cli/main.go 文件模板
	CpftCliMain = `` /* 158-byte string literal not displayed */

	// plugin/dapp/xxxx/commands/cmd.go文件的模板c
	CpftDappCommands = `package commands

import (
	"github.com/spf13/cobra"
)

func Cmd() *cobra.Command {
	return nil
}`

	// plugin/dapp/xxxx/plugin.go文件的模板
	CpftDappPlugin = `` /* 432-byte string literal not displayed */

	// plugin/dapp/xxxx/executor/xxxx.go文件模板
	CpftDappExec = `` /* 1094-byte string literal not displayed */

	// plugin/dapp/xxxx/proto/create_protobuf.sh文件模板
	CpftDappCreatepb = `#!/bin/sh
protoc --go_out=plugins=grpc:../types ./*.proto --proto_path=. 
`

	// plugin/dapp/xxxx/proto/Makefile 文件模板
	CpftDappMakefile = `all:
	sh ./create_protobuf.sh
`

	// plugin/dapp/xxxx/proto/xxxx.proto的文件模板
	CpftDappProto = `` /* 158-byte string literal not displayed */

	// plugin/dapp/xxxx/types/types.go的文件模板cd
	CpftDappTypefile = `` /* 897-byte string literal not displayed */

)

const

Variables

This section is empty.

Functions

This section is empty.

Types

type Strategy

type Strategy interface {
	SetParam(key string, value string)
	Run() error
}

Strategy 策略

func New

func New(name string) Strategy

New new

Jump to

Keyboard shortcuts

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