Documentation
¶
Overview ¶
Copyright © 2024 lflxp <382023823@qq.com>
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.
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2023 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
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.
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2024 NAME HERE <EMAIL ADDRESS>
Copyright © 2021 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.
Copyright © 2020 NAME lflxp <382023823@qq.com>
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 © 2021 lflxp <382023823@qq.com>
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 © 2024 NAME HERE <EMAIL ADDRESS>
Index ¶
Constants ¶
const ZshCompletion = `compdef _k k # 添加 _gmt 函数
__showme-cli_debug()
{
local file="$BASH_COMP_DEBUG_FILE"
if [[ -n ${file} ]]; then
echo "$*" >> "${file}"
fi
}
_k() {
local matches namespace result
# 获取一次性结果
result=$(command showme smart ${LBUFFER})
__showme-cli_debug "namespace ${result}"
namespace=$(command echo ${result}|head -1|awk '/^NAMESPACE/ {print "yes"}')
__showme-cli_debug "namespace ${namespace}"
# 根据标题是否含有NAMESPACE动态切换显示结果
if [[ -n "$namespace" ]]; then
matches=$(command echo ${result} | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-50%} --header-lines=1 --min-height 15 --reverse $FZF_DEFAULT_OPTS --preview 'echo {}' --preview-window down:3:wrap $FZF_COMPLETION_OPTS" showme -m|awk '{print "-n "$1" "$2}'|tr '\n' ' ')
else
matches=$(command echo ${result} | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-50%} --header-lines=1 --min-height 15 --reverse $FZF_DEFAULT_OPTS --preview 'echo {}' --preview-window down:3:wrap $FZF_COMPLETION_OPTS" showme -m|awk '{print $1}'|tr '\n' ' ')
fi
#_describe 'command' ns
if [ -n "$matches" ]; then
LBUFFER="${LBUFFER}$matches"
# LBUFFER="${BUFFER} $matches"
fi
zle reset-prompt
}
zle -N _k
#定义快捷键为: [Esc] [Esc]
` + "bindkey '`' _k"
const ZshCompletionDebug = `compdef _k k # 添加 _gmt 函数
__showme-cli_debug()
{
local file="$BASH_COMP_DEBUG_FILE"
if [[ -n ${file} ]]; then
echo "$*" >> "${file}"
fi
}
_k() {
local matches namespace result
# 获取一次性结果
result=$(command showme smart -d ${LBUFFER})
__showme-cli_debug "namespace ${result}"
namespace=$(command echo ${result}|head -1|awk '/^NAMESPACE/ {print "yes"}')
__showme-cli_debug "namespace ${namespace}"
# 根据标题是否含有NAMESPACE动态切换显示结果
if [[ -n "$namespace" ]]; then
matches=$(command echo ${result} | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-50%} --header-lines=1 --min-height 15 --reverse $FZF_DEFAULT_OPTS --preview 'echo {}' --preview-window down:3:wrap $FZF_COMPLETION_OPTS" showme -m|awk '{print "-n "$1" "$2}'|tr '\n' ' ')
else
matches=$(command echo ${result} | FZF_DEFAULT_OPTS="--height ${FZF_TMUX_HEIGHT:-50%} --header-lines=1 --min-height 15 --reverse $FZF_DEFAULT_OPTS --preview 'echo {}' --preview-window down:3:wrap $FZF_COMPLETION_OPTS" showme -m|awk '{print $1}'|tr '\n' ' ')
fi
#_describe 'command' ns
if [ -n "$matches" ]; then
LBUFFER="${LBUFFER}$matches"
# LBUFFER="${BUFFER} $matches"
fi
zle reset-prompt
}
zle -N _k
#定义快捷键为: [Esc] [Esc]
` + "bindkey '`' _k"
Variables ¶
var (
MaxConnections int64
)
Functions ¶
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
Types ¶
type Demotest2 ¶ added in v0.10.0
type Demotest2 struct { Id int64 `xorm:"id pk not null autoincr" name:"id" search:"true"` Country string `json:"country" xorm:"varchar(255) not null" search:"true"` Zoom string `json:"zoom" xorm:"varchar(255) not null"` Company string `json:"company" xorm:"varchar(255) not null"` Items string `json:"items" xorm:"varchar(255) not null"` Production string `json:"production" xorm:"varchar(255) not null"` Count string `json:"count" xorm:"varchar(255) not null"` Serial string `json:"serial" xorm:"varchar(255) not null" search:"true"` Extend string `json:"extend" xorm:"varchar(255) not null"` Files string `xorm:"file" name:"file" verbose_name:"上传文件" colType:"file"` File2 string `xorm:"file2" name:"file2" verbose_name:"上传文件2" colType:"file"` Type string `xorm:"type" name:"type" verbose_name:"类型" search:"false" colType:"textarea"` Detail string `xorm:"detail" name:"detail" verbose_name:"VPN信息" list:"false" search:"false" o2m:"vpn|id,vpn" colType:"o2m"` Times time.Time `xorm:"times" name:"times" verbose_name:"时间" colType:"time" list:"true" search:"true"` }