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

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

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

支付宝扫一扫打赏

微信扫一扫打赏