上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 18 下一页
摘要: import ( "fmt" "os" "path/filepath" "path" ) files := "E:\\data\\test.txt" paths, fileName := filepath.Split(files) fmt.Println(paths, fileName) //获取路 阅读全文
posted @ 2022-01-27 15:53 醒日是归时 阅读(1680) 评论(0) 推荐(0) 编辑
摘要: //方法一 func readConfig1(path, filename, filetype string) interface{} { viper.AddConfigPath(path) viper.SetConfigFile(filename) viper.SetConfigType(file 阅读全文
posted @ 2022-01-27 14:32 醒日是归时 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 错误问题 Vue:xhr.upload.addEventListener is not a function 这个问题是因为mockjs改动了axios里面XMLHttpRequest对象致使的 根据axios源码 l是一个XMLHttpRequest对象 mockJs把l变量从XMLHttpReq 阅读全文
posted @ 2022-01-21 16:25 醒日是归时 阅读(2668) 评论(1) 推荐(0) 编辑
摘要: #!/usr/bin/env python # -*- coding: utf8 -*-import pymysql, sqlparse from app import logger class MysqlDb: def __init__(self, db, connect_timeout=5): 阅读全文
posted @ 2021-12-11 22:26 醒日是归时 阅读(167) 评论(0) 推荐(0) 编辑
摘要: 一,准备工作 准备四台centos服务器,三台用于consul server 高可用集群,一台用于consul client作服务注册及健康检查。架构如下图所示 二,在四台服务器上安装consul 1,安装unzip 工具:yum install -y zip unzip 2,查看centos版本。 阅读全文
posted @ 2021-12-09 02:12 醒日是归时 阅读(409) 评论(0) 推荐(0) 编辑
摘要: golang 按行读取文件 file, err := os.Open("app-2019-06-01.log") if err != nil { log.Fatal(err) } defer file.Close() scanner := bufio.NewScanner(file) for sca 阅读全文
posted @ 2021-12-02 17:58 醒日是归时 阅读(40) 评论(0) 推荐(0) 编辑
摘要: //判断文件是否存在 存在返回 true 不存在返回false func checkFileIsExist(filename string) bool { var exist = true if _, err := os.Stat(filename); os.IsNotExist(err) { ex 阅读全文
posted @ 2021-12-02 17:46 醒日是归时 阅读(454) 评论(0) 推荐(0) 编辑
摘要: // path package main import ( "fmt" "os" "path" "path/filepath" ) func main() { //Path操作 fmt.Println("Path操作 ") fmt.Println(path.Base("http://www.baid 阅读全文
posted @ 2021-12-02 17:40 醒日是归时 阅读(170) 评论(0) 推荐(0) 编辑
摘要: package main import "bytes" import "fmt" import "regexp" func main() { //这个测试一个字符串是否符合一个表达式。 match, _ := regexp.MatchString("p([a-z]+)ch", "peach") fm 阅读全文
posted @ 2021-12-02 14:21 醒日是归时 阅读(205) 评论(0) 推荐(0) 编辑
摘要: #所需模块flask_apscheduler #encodig=utf-8 from flask import Flask, request from flask_apscheduler import APScheduler class Config(object): # 创建配置,用类 # 任务列 阅读全文
posted @ 2021-11-05 20:59 醒日是归时 阅读(523) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 18 下一页