This verse is a direct echo of Mormon’s discourse that Moroni included as Moroni 7:
Moroni 7:12-16
12 Wherefore, all things which are good cometh of God; and that which is evil cometh of the devil; for the devil is an enemy unto God, and fighteth against him continually, and inviteth and enticeth to sin, and to do that which is evil continually.
13 But behold, that which is of God inviteth and enticeth to do good continually; wherefore, every thing which inviteth and enticeth to do good, and to love God, and to serve him, is inspired of God.
14 Wherefore, take heed, my beloved brethren, that ye do not judge that which is evil to be of God, or that which is good and of God to be of the devil.
15 For behold, my brethren, it is given unto you to judge, that ye may know good from evil; and the way to judge is as plain, that ye may know with a perfect knowledge, as the daylight is from the dark night.
16 For behold, the Spirit of Christ is given to every man, that he may know good from evil; wherefore, I show unto you the way to judge; for every thing which inviteth to do good, and to persuade to believe in Christ, is sent forth by the power and gift of Christ; wherefore ye may know with a perfect knowledge it is of God.
Moroni’s restatement gives us the essence of the more complete argument in Mormon, but the basic premise is the same. Moroni is telling us that we may judge whether the Book of Mormon is true based upon the confirmation of the Spirit. In Moroni 7:16 Mormon had indicated that the “Spirit of Christ is given to every man, that he may know good from evil.” Moroni adapts that understanding to the relationship of the Holy Spirit to the confirmation of truth in the Book of Mormon. The Holy Ghost will confirm the truth of the Book of Mormon, and we may know Godly truth because “whatsever thing is good is just and true,” and good things come from God. Moroni is restating the essence of his father’s discourse in the context of his final admonition.