17 Then, as a proof that He resents the name “good master,” on the ground of the unbelief, which addresses Him as a man, He replies to the vain-glorious youth, and his boast that he had fulfilled the law, One thing you lack, go, sell whatsoever you have, and give to the poor, and you shall have treasure in heaven; and come, follow Me. There is no shrinking from the title of “good” in the promise of heavenly treasures, no reluctance to be regarded as “master” in the offer to lead the way to perfect blessedness. But there is reproof of the unbelief which draws an earthly opinion of Him from the teaching, that goodness belongs to God alone. To signify that He is both good and God, He exercises the functions of goodness, opening the heavenly treasures, and offering Himself as guide to them. All the homage offered to Him as man He repudiates, but he does not disown that which He paid to God; for at the moment when He confesses that the one God is good, His words and actions are those of the power and the goodness and the nature of the one God.
Source: On the Trinity (New Advent)