Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WriteCsvFile自定义分割符,增加map切片写入csv,增加追踪函数运行时间的函数 #157

Merged
merged 2 commits into from
Jan 1, 2024

Conversation

coloraven
Copy link
Contributor

@coloraven coloraven commented Dec 31, 2023

  1. WriteCsvFile自定义分割符;
  2. 同时以分隔符为基础对单元格的值进行了转义处理;
  3. map切片写入csv函数WriteMapsToCSV
  4. 增加追踪函数执行时间的函数TraceFuncTime

@coloraven coloraven changed the title 1. WriteCsvFile现在支持自定义分割符;同时以分隔符为基础对单元格的值进行了转义处理,Add write map slice to csv WriteCsvFile自定义分割符,增加map切片写入csv,增加追踪函数运行时间的函数 Dec 31, 2023
@codecov-commenter
Copy link

Codecov Report

Attention: 29 lines in your changes are missing coverage. Please review.

Comparison is base (1b1b10d) 80.38% compared to head (e6ca030) 80.06%.
Report is 1 commits behind head on main.

Files Patch % Lines
fileutil/file.go 25.00% 21 Missing and 3 partials ⚠️
datetime/datetime.go 0.00% 5 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #157      +/-   ##
==========================================
- Coverage   80.38%   80.06%   -0.32%     
==========================================
  Files          65       65              
  Lines        7004     7039      +35     
==========================================
+ Hits         5630     5636       +6     
- Misses       1049     1075      +26     
- Partials      325      328       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@duke-git duke-git merged commit 3482f80 into duke-git:main Jan 1, 2024
1 of 3 checks passed
@duke-git
Copy link
Owner

duke-git commented Jan 1, 2024

@coloraven, WriteMapsToCsv存在问题:写入map slice到csv文件再读取数据,每次读到的key的顺序是随机的。(fileutil/file_example_test.go ExampleWriteMapsToCsv)
image

@coloraven
Copy link
Contributor Author

@coloraven, WriteMapsToCsv存在问题:写入map slice到csv文件再读取数据,每次读到的key的顺序是随机的。(fileutil/file_example_test.go ExampleWriteMapsToCsv) image

这跟map本身是无序有关,除非提前提取key,然后对key按照一定规则进行排序,再写入,读取的时候也按照同样的规则对key进行排序。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants