what does ごと here mean?


I am not sure what ごと means in this context and I am also not too sure about
what's exactly the topic in this later sentence.

> A.彼を見捨てろってことか？
>
> B.あくまで客観的に見て．．．今後の状況危険性を考えたら…という話。もちろんその危険 **ごと** 面倒見てこその本当の友達なのかもしれないけど。

I would have translated it as

A.You are saying, we should abandon him?

B.Well, yes. If you look at the things objectively, if you think about the
futur risks, than... Of course, you might also say, a true friend will stay by
your side because of the risks.

I am not to confident in the last part of my translation... So ごと would add
nothing new? Is it just a roundabout way to say risky "things"?Which kinda
get's lost in translation? Another meaning for ごと that I found was "including"
but I couldn't find a site that explains how you would use this kind of ごと and
I am not sure if thats what the sentence is conveying.




This ごと is a suffix that attaches to a noun and means "along with ～",
"including ～", etc. It's normally written in hiragana, but it's 共 in kanji,
not 事.

  * 皮 **ごと** ブドウをたべる  
to eat grapes along with the skin

  * サイア人を惑星ベジータ **ごと** 消滅させる  
to vanish Saiyans along with Planet Vegeta (from [this
question](https://japanese.stackexchange.com/q/68001/5010))

  * ～の面倒をその危険 **ごと** みる  
to look after someone along with the risks he/she has

>
> もちろんその危険ごと面倒見て[こその](https://japanese.stackexchange.com/q/24755/5010)本当の友達なのかもしれないけど。  
>  Of course, you might say you cannot call someone a true friend if he does
> not look after you along with your risk.




This ごと is a suffix that attaches to a noun and means "along with ～",
"including ～", etc. It's normally written in hiragana, but it's 共 in kanji,
not 事.

  * 皮 **ごと** ブドウをたべる  
to eat grapes along with the skin

  * サイア人を惑星ベジータ **ごと** 消滅させる  
to vanish Saiyans along with Planet Vegeta (from [this
question](https://japanese.stackexchange.com/q/68001/5010))

  * ～の面倒をその危険 **ごと** みる  
to look after someone along with the risks he/she has

>
> もちろんその危険ごと面倒見て[こその](https://japanese.stackexchange.com/q/24755/5010)本当の友達なのかもしれないけど。  
>  Of course, you might say you cannot call someone a true friend if he does
> not look after you along with your risk.

