knife

command module
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

README

knife小工具

小工具

go get -u github.com/clibing/knife

or

git clone github.com/clibing/knife

安装

下载二进制包,执行安装命令即可

  • linux/macos 默认安装到 /usr/local/bin/knife
  • win 默认安装到 C:/Windows/system32/knife.exe

以macos为例

chmod a+x knife_darwin_amd64
sudo ./knife_darwin_amd64 install 

输出
install success

查看帮助

knife -h

主要是实现一些简单常用的方法

功能

  • 1.时间格式化工具,实现提取当前系统的戳毫秒(13位), 接收一个时间戳按照指定的格式进行格式化。
  • 2.URL编码解码
  • 3.加密计算, 默认接收字符串计算,支持计算指定的文件
    • 接收字符串
    • 加密文件
  • 4.xml,json,yml 互转与美化
    • 格式化json
    • json to xml
    • xml to json
    • yml to json
    • json to yml
  • 5.常用定时器cron表达式
  • 6.图片生成 从Base64生成文件,根据文件生成Base64
  • 7.RSA公钥私钥生成器
  • 8.二维码生成器
  • 9.IP查询,支持本机ip、出口ip等
  • 10.markdown处理,支持从HTML转Markdown
  • 11.正则表达式
  • 12.CPU和内存使用率
  • 13.生成随机数(默认UUID)支持数字、大小26个英文、标点符号
  • 14.wake on lan
  • 15.升级

Documentation

Overview

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.

Directories

Path Synopsis
cmd
internal

Jump to

Keyboard shortcuts

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