SMB2 with Golang communication and authentication

Hey there,
I have been trying to figure out Go-lang in a few ways but here with the SMB2 configuration I’m having a lot of trouble:

In this module there is a type called *RemoteFileSystem
putting aside the module, after I run the following
filesystem, err := client.Mount(host)
if err != nil {
panic(err)
}
defer filesystem.Umount()
fmt.Println(filesystem)

this prints out the following:
&{0xc000048650 0xc0000160d8}

how can I see import and use this value later in my program, for example:
there are a lot of functions that can be used in the this SMB2 module using the *RemoteFileSystem struct
for example:
*RemoteFileSystem.Remove()
*RemoteFileSystem.FileRead()

if i want to take the return value of ‘filesystem’ from the syntax i just posted in a different function, how is that possible?
And if someone can explain to me in a more simplified way how I can play with the * and & values

Thanks !

Hi, @T_pch,

Firstly, can you wrap your code in ``` so that it’s formatted properly? For example:

```
code here
```

Secondly: If you’re able to print that filesystem object, then you can call methods on it too. Can you clarify what you’d like to do and what you’ve tried so far?

Thank you I have resolved this issue!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.