"official/legacy/transformer/compute_bleu.py" did not exist on "bc557d1441d47d013b7617a63f45ac03c3948110"
cdi.go 907 Bytes
Newer Older
songlinfeng's avatar
songlinfeng committed
1
2
3
4
5
6
7
/**
# Copyright (c) 2024, HCUOpt CORPORATION.  All rights reserved.
**/

package cdi

import (
8
9
10
11
	"dcu-container-toolkit/cmd/dcu-ctk/cdi/generate"
	"dcu-container-toolkit/cmd/dcu-ctk/cdi/list"
	"dcu-container-toolkit/cmd/dcu-ctk/cdi/transform"
	"dcu-container-toolkit/internal/logger"
songlinfeng's avatar
songlinfeng committed
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

	"github.com/urfave/cli/v2"
)

type command struct {
	logger logger.Interface
}

// NewCommand constructs an info command with the specified logger
func NewCommand(logger logger.Interface) *cli.Command {
	c := command{
		logger: logger,
	}
	return c.build()
}

// build
func (m command) build() *cli.Command {
	// Create the 'hook' command
	hook := cli.Command{
		Name:  "cdi",
		Usage: "Provide tools for interacting with Container Device Interface specifications",
	}

	hook.Subcommands = []*cli.Command{
		generate.NewCommand(m.logger),
		transform.NewCommand(m.logger),
		list.NewCommand(m.logger),
	}

	return &hook
}