to be
a problem slover

golang join filename and dir as path

To concat dir and fileName as a path, use code below

path := filepath.Join(dir, fileName)

or

path := dir + os.PathSeparator + fileName
赞(3) 打赏
欢迎转载,注明出处:刘世明的博客 » golang join filename and dir as path

评论 5

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    Can you be more specific about the content of your article? After reading it, I still have some doubts. Hope you can help me. https://accounts.binance.com/register-person?ref=IHJUI7TF

  2. #2

    Thanks for sharing. I read many of your blog posts, cool, your blog is very good.

    binance "oppna konto2个月前 (04-19)回复
  3. #3

    I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article.

    Binance注册2个月前 (04-27)回复
  4. #4

    My parfner aand I stumbled ovr here byy
    a differernt website andd thougjt I might ass ell cjeck things out.
    I lioke what I seee soo noww i’m following you. Loook forwardd too lolking aat ylur
    web page forr a second time.

    国语色情片2周前 (05-27)回复
  5. #5

    I don’t think the title of your article matches the content lol. Just kidding, mainly because I had some doubts after reading the article. https://www.gate.com/share/XwNAUwgM

觉得文章有用就打赏一下作者

支付宝扫一扫打赏

微信扫一扫打赏