filepath.Join removes dot
问题 i have a problem with create path for rsync. x := filepath.Join("home", "my_name", "need_folder", ".") fmt.Println(x) I get "home/my_name/need_folder" , but need "home/my_name/need_folder/." , how fix without concat? In linux folder with name "." not impossible. Thank you! 回答1: You can't do that with the filepath.Join() as its documentation states: Join calls Clean on the result... And since . denotes the "current" directory, it will be removed by filepath.Clean(): It applies the following