ti

package module
v0.0.0-...-2ee375a Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2017 License: BSD-3-Clause Imports: 12 Imported by: 0

README

the_titanium_searcher

linux darwin windows
travis-ci.org circleci.com appveyor-badge
godoc.org codecov.io
godoc.org codecov.io

A code search tool using SIMD instructions(SSE, AVX) written in Go.

First goal is fully compatible and faster than the_platinum_searcher (pt).

Analytics

Benchmark target

TODO

  • Use SIMD instructions
  • Support multi encodings
    • IOS-2022-JP
    • EUC-JP
    • Shift_JIS
  • snapcraft.yaml

Documentation

Overview

Package ti implements code search tool using SIMD instructions.

Index

Constants

View Source
const (
	// UNKNOWN unknown encoding type.
	UNKNOWN encodingType = iota
	// ERROR encoding error.
	ERROR
	// BINARY binary encoding type.
	BINARY
	// ASCII ascii encoding type.
	ASCII
	// UTF8 utf-8 encoding type.
	UTF8
	// EUCJP EUC-JP encoding type.
	EUCJP
	// SHIFTJIS Shift JIS encoding type.
	SHIFTJIS
)

Variables

View Source
var (
	// ConfigHome returns the ti config home directory.
	ConfigHome = filepath.Join(xdgbasedir.ConfigHome(), "ti")
	// ConfigFile returns the ti config file path.
	ConfigFile = filepath.Join(ConfigHome, "config.yml")
	// IgnoreFile returns the ti ignore file path.
	IgnoreFile = filepath.Join(ConfigHome, "ignore")
)

Functions

func Debug

func Debug(a ...interface{})

Debug prints debug log. Arguments are handled in the manner of fmt.Print.

func Debugf

func Debugf(format string, a ...interface{})

Debugf prints debug log. Arguments are handled in the manner of fmt.Printf.

func Debugln

func Debugln(a ...interface{})

Debugln prints debug log. Arguments are handled in the manner of fmt.Println.

func Dump

func Dump(a ...interface{})

Dump dumps a and prints debug log. Arguments are handled in the manner of fmt.Print.

func FileDescriptor

func FileDescriptor(path string) (*os.File, error)

FileDescriptor opens path and returns the file descriptor if path is non-nil. If path is empty, returns the stdin file descriptor.

func Profile

func Profile(name string, now time.Time)

Profile the end time of the function.

Types

type Option

type Option struct {
	Version bool
	Profile string

	Output OutputOption
	Search SearchOption
}

Option represents the_titanium_searcher option.

func NewOption

func NewOption() *Option

NewOption returns the Option with pointer.

type OutputOption

type OutputOption struct {
	EnableColor bool
	Color       struct {
		Match  string
		Number string
		Path   string
	}
	Group   bool
	Null    bool
	Column  bool
	Number  bool
	Context struct {
		After   int
		Before  int
		Context int
	}
	FilesWithMatches bool
	Count            bool
	Encode           string
}

OutputOption represents the_titanium_searcher output option.

type SearchOption

type SearchOption struct {
	Regexp           bool
	IgnoreCase       bool
	SmartCase        bool
	WordRegexp       bool
	Ignore           []string
	VCSIgnore        []string
	GlobalGitIgnore  bool
	TIIgnore         bool
	SkipVCSIgnores   bool
	FilesWithRegexp  bool
	FileSearchRegexp string
	Depth            int
	Follow           bool
	Hidden           bool
}

SearchOption represents the_titanium_searcher search option.

Directories

Path Synopsis
cmd
ti
internal
mmap
Package mmap provides a way to memory-map a file.
Package mmap provides a way to memory-map a file.

Jump to

Keyboard shortcuts

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