util

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

* Copyright (C) [SonicCloudOrg] Sonic Project * * 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 (C) [SonicCloudOrg] Sonic Project * * 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 (
	ErrConnect     = "failed connecting to"
	ErrReadingMsg  = "failed reading msg"
	ErrSendCommand = "failed send the command"
	ErrMissingArgs = "missing arg(s)"
	ErrUnknown     = "unknown error"
	MountTips      = "you can use [sib mount] command to fix it and retry"
)
View Source
const DownLoadTimeOut = 30 * time.Second

Variables

This section is empty.

Functions

func CheckMount added in v1.0.3

func CheckMount(device giDevice.Device)

func Format

func Format(d ResultData, isFormat, isJson bool) string

func GetApplicationPID added in v1.1.9

func GetApplicationPID(device giDevice.Device, appName string) (pid int, err error)

func GetDeviceByUdId added in v1.0.7

func GetDeviceByUdId(udId string) (device giDevice.Device)

func GetDeviceVersion added in v1.2.1

func GetDeviceVersion(device giDevice.Device) string

func NewErrorPrint

func NewErrorPrint(t string, msg string, err error) error

Types

type ResultData

type ResultData interface {
	ToJson() string
	ToString() string
	ToFormat() string
}

Jump to

Keyboard shortcuts

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