cli

command
v0.3.0-espresso Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2020 License: Apache-2.0, Apache-2.0 Imports: 1 Imported by: 0

README

CB-Tumblebug CLI (가칭:tbctl)

CB-Tumblebug의 기본적인 시나리오 테스트를 지원하기 위한 CLI 도구


[목차]

  1. CLI 개요
  2. CLI 사용 방법
  3. CLI 개발 방법

[CLI 개요]

  • CB-Tumblebug의 기본적인 시나리오 테스트를 지원하기 위한 CLI (목적 변경 가능)
  • CLI 기본 코드는 cobra 프로젝트 (https://github.com/spf13/cobra) 를 통해 자동 생성함
  • 현황: 개발 진행중

[CLI 사용 방법]

  • cb-tumblebug 기본 환경 변수 설정
    • cb-tumblebug/conf 에서 source setup.env
  • cb-tumblebug/src/cli 에서 go run main.go [명령어] [옵션]
    • 예제) go run main.go --help
    • 예제) go run main.go create -f mcis.json -t mcis
    • 예제) go run main.go get -f ns.json -t ns

[CLI 개발 방법]

  • Cobra 설치 및 사용방법 확인
    • go get -u github.com/spf13/cobra/cobra cobra 설치
    • $GOPATH/bin/cobra init ./cb-tumblebug/src/cli --pkg-name cli 새로운 cli 프로젝트 생성시 명령어 (cobra가 코드를 자동 생성)
    • $GOPATH/bin/cobra add create 프로젝트 내에 신규 cli 명령어(ex:create) 추가 (cobra가 create 관련 코드를 자동 생성)
    • cli/cmd/create.go 를 수정 개발하면 create 명령어 실행 내용을 변경할 수 있음
    • cobra_사용_방법 참고

Documentation

Overview

Copyright © 2020 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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