imodel

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ManDataObjectStruct

type ManDataObjectStruct smodel.ManDataObject

func NewManDataObject

func NewManDataObject() *ManDataObjectStruct

* コンストラクタ

func (*ManDataObjectStruct) AnalyzeMan

func (myself *ManDataObjectStruct) AnalyzeMan(manResult string)

* @description コマンド実行結果からオプションを抽出する * オプションの判定方法 * - `-` (または `--`) を検索する * - 検索結果に対して`-`(または `--`) の出現位置(index)を計算する * - 出現位置(index)の値だけ空白文字を生成し、オプションと結合する * - 結合した値と元の値を比較し、一致すればオプションとみなす * @params manResult manコマンド実行結果

func (*ManDataObjectStruct) GetMatchedInfo

func (myself *ManDataObjectStruct) GetMatchedInfo(text string, index int) smodel.MatchedInfo

* @description マッチ情報を構造体にセット * @params text テキスト * @params index インデックス * @return 構造体

func (*ManDataObjectStruct) IncrementalSearch

func (myself *ManDataObjectStruct) IncrementalSearch(query string)

* @param query クエリ * @description

  1. クエリを空白類で区切って配列化する
  2. 区切ったクエリを1要素ごとに取り出す
  3. 取り出したクエリが、オプション説明文字列の部分文字列なら、次回に取り出すクエリに対する検索対象として、オプション説明文字列を配列に格納する
  4. 区切ったクエリをすべて取り出し終えるか、次回の検索対象のオプション説明文字列が無くなるまで2.と3.を繰り返す

func (*ManDataObjectStruct) MapLineNumber

func (myself *ManDataObjectStruct) MapLineNumber() []int

* @description LineNumber の配列を返す * @return インデックスの配列

func (*ManDataObjectStruct) MapMatchedText

func (myself *ManDataObjectStruct) MapMatchedText() []string

* @description MatchedText の配列を返す * @return テキストの配列

Jump to

Keyboard shortcuts

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