Period should be at the end of lines

Call().
Chain().
Done()


Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: golang-nuts@googlegroups.com <golang-nuts@googlegroups.com> on behalf of 
Denis P <denis.puj...@gmail.com>
Sent: Thursday, November 24, 2022 11:45:54 AM
To: golang-nuts <golang-nuts@googlegroups.com>
Subject: [go-nuts] Method chaining in multiple lines

Hi guys,

I am struggling with making my code work in a way that multiple methods called 
in multiline approach. Does any gopher has an answer is there any solution to 
this:
```
type MyStuff struct { }

func CreateMyStuff() MyStuff {}

func (s MyStuff) DoJobOne() MyStuff {}

func (s MyStuff) DoJobTwo() MyStuff {}

...

result := CreateMyStuff()
    . DoJobOne() // Error: expected statement, found '.'
    . DoJobTwo()

```

I have an error " expected statement, found '.' ".
Is there any workaround?

--
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
golang-nuts+unsubscr...@googlegroups.com<mailto:golang-nuts+unsubscr...@googlegroups.com>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/182bae0c-de3f-417e-82bb-07ca3d26e71an%40googlegroups.com<https://groups.google.com/d/msgid/golang-nuts/182bae0c-de3f-417e-82bb-07ca3d26e71an%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CO2PR07MB25835FB3F0B4CBFA1D8611EDA00F9%40CO2PR07MB2583.namprd07.prod.outlook.com.

Reply via email to