You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: fast_log.go
    path of file: ./repos/quicktemplate/vendor/github.com/andybalholm/brotli
    
    the code of the file until where you have to start completion: package brotli

import "math"

/* Copyright 2013 Google Inc. All Rights Reserved.

   Distributed under MIT license.
    
func log2FloorNonZero(n uint) uint32 {
	/* TODO: generalize and move to platform.h */
	var result uint32 = 0
	for {
		n >>= 1
		if n == 0 {
			break
		}
		result++
	}
	return result
}