command

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Application = "stock"
)
View Source
var CmdRepair = &flags.Command{
	Use:     "repair",
	Example: Application + " repair --all",

	Args: func(cmd *flags.Command, args []string) error {
		return nil
	},
	Short: "回补股市数据",
	Long:  `回补股市数据`,
	Run: func(cmd *flags.Command, args []string) {
		beginDate := trading.FixTradeDate(flagStartDate.Value)
		endDate := cachel5.DefaultCanReadDate()
		if len(flagEndDate.Value) > 0 {
			endDate = trading.FixTradeDate(flagEndDate.Value)
		}
		if flagHistory.Value {

			handleRepair(beginDate, endDate)
		}
	},
}

CmdRepair 补登历史数据

View Source
var CmdUpdate = &flags.Command{
	Use:     "update",
	Example: Application + " update --all",

	Args: func(cmd *flags.Command, args []string) error {
		return nil
	},
	Short: "更新股市数据",
	Long:  `更新股市数据`,
	Run: func(cmd *flags.Command, args []string) {
		if flagAll.Value {

			handleUpdateAll()
		} else if flagHistory.Value {

		}
	},
}

CmdUpdate 更新数据

Functions

This section is empty.

Types

type Command added in v0.1.3

type Command = flags.Command

Jump to

Keyboard shortcuts

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