logextractor

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

* Copyright 2022 ByteDance Inc. * * 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.

* Copyright 2022 ByteDance Inc. * * 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.

Index

Constants

View Source
const (
	ModTidyLogType int8 = 1
	// error message
	ModTidyErrMessage     string = "missing go.sum entry"
	ModTidySuggestMessage string = "Sorry,suggest you execute go mod tidy,and generate again"
)

Variables

View Source
var CannotFindTestedFunctionError = errors.New("Error Code is I3058, cannot find tested function.\nYou can run go vet [my/project/...] or go build to resolve the compiling issue.")

Cannot find the tested function

View Source
var CannotParseTestedFunctionError = errors.New("Error Code is P3045, cannot find tested function.\n")

Cannot parse the test function

View Source
var DependencyInitError = errors.New("error Code is P3023.\n")

DependencyInitError DependencyError DependencyInitError Dependency Error

View Source
var ExecutionLog = executionLog{
	// contains filtered or unexported fields
}
View Source
var GenerateTemplateImportError = errors.New("Error Code is I3053, template import merge fail.\n")

Generate template import process error

View Source
var GenerateTestNotRunnableError = errors.New("Error Code is I3050, generate code cannot be runnable.\n")

Generate test is not runnable

View Source
var GenerateTestRenameError = errors.New("Error Code is I3057, test rename error.\n")

Generate test rename error

View Source
var GenerateTestTemplateCannotParseImportError = errors.New("Error Code is I3055, template import cannot be parsed.\n")

Generate test template cannot parse import error

View Source
var GenerateTestTemplateError = errors.New("Error Code is I3052, cannot generate template.\nThis error is normally go with other errors. It is not able to be fixed.\nPlease fix other errors first.\n")

Generate test template fail after generate test failed

View Source
var GenerateTestTemplateInternalError = errors.New("Error Code is I3059, template internal error.\n")

Generate test template internal error

View Source
var GenerateTestTemplateRenameError = errors.New("Error Code is I3056, template rename error.\n")

Generate test template rename error

View Source
var GoGetError = errors.New("Error Code is P3054, go get error.\nYou can run go vet [my/project/...] or go build to resolve the compiling issue.")

GoGetError Go Get Error

View Source
var GoModTidyError = errors.New("Error Code is P3048, go mod tidy error.\n")

Go mod tidy in Fix Go File

View Source
var InspiredCloudCreatedError = errors.New("Error Code is N3042, inspired cloud create\n")

InspiredCloudCreatedError Inspired Cloud Error

View Source
var InspiredCloudUpdatedError = errors.New("Error Code is N3043, inspired cloud update.\n")
View Source
var LocalFileNotSupportedError = errors.New("Error Code is P3044, local file is not supported.We cannot generate the unit test for this file.For example, this file belongs to kite_x, govender\n")

LocalFileNotSupported LocalFileError Local File is not supported

View Source
var MergeTestConflictError = errors.New("Error Code is I3051, merge code conflict.\n")

Merge test has a conflict

View Source
var MiddleCodeCannotGenerateFinalCodeError = errors.New("Error Code is I3049, cannot generate the final code for middle code.\n")

Middle code cannot generate the final code

View Source
var MiddleCodeGenerateError = errors.New("Error Code is I3047, middle code cannot be generated.\n")

Middle Code generate error

View Source
var NullPointerError = errors.New("error Code is P3055.\n")
View Source
var ParseProgramError = errors.New("Error Code is P3046, cannot find go executable file.\n")

ParseProgramError Source Code Add Code Error

View Source
var SourceCodePluginCodeError = errors.New("Error Code is I3046, cannot add plugin to source code.\n")

SourceCodePluginCodeError Source Code Add Code Error

Functions

func CommandAnalyze

func CommandAnalyze(log string)

TODO: handle more scenarios.

func GenSuggestByErrLog

func GenSuggestByErrLog(e error, stdOutput, stdError string) error

Types

type LogExtractor

type LogExtractor interface {
	GenSuggestByErrLog() error
}

Jump to

Keyboard shortcuts

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