本文整理匯總了Golang中C.git_checkout_options.disable_filters方法的典型用法代碼示例。如果您正苦於以下問題:Golang git_checkout_options.disable_filters方法的具體用法?Golang git_checkout_options.disable_filters怎麽用?Golang git_checkout_options.disable_filters使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類C.git_checkout_options
的用法示例。
在下文中一共展示了git_checkout_options.disable_filters方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: populateCheckoutOpts
// Convert the CheckoutOpts struct to the corresponding
// C-struct. Returns a pointer to ptr, or nil if opts is nil, in order
// to help with what to pass.
func populateCheckoutOpts(ptr *C.git_checkout_options, opts *CheckoutOpts) *C.git_checkout_options {
if opts == nil {
return nil
}
C.git_checkout_init_options(ptr, 1)
ptr.checkout_strategy = C.uint(opts.Strategy)
ptr.disable_filters = cbool(opts.DisableFilters)
ptr.dir_mode = C.uint(opts.DirMode.Perm())
ptr.file_mode = C.uint(opts.FileMode.Perm())
return ptr
}
示例2: populateCheckoutOpts
// Convert the CheckoutOpts struct to the corresponding
// C-struct. Returns a pointer to ptr, or nil if opts is nil, in order
// to help with what to pass.
func populateCheckoutOpts(ptr *C.git_checkout_options, opts *CheckoutOpts) *C.git_checkout_options {
if opts == nil {
return nil
}
C.git_checkout_init_options(ptr, 1)
ptr.checkout_strategy = C.uint(opts.Strategy)
ptr.disable_filters = cbool(opts.DisableFilters)
ptr.dir_mode = C.uint(opts.DirMode.Perm())
ptr.file_mode = C.uint(opts.FileMode.Perm())
if opts.TargetDirectory != "" {
ptr.target_directory = C.CString(opts.TargetDirectory)
}
if len(opts.Paths) > 0 {
ptr.paths.strings = makeCStringsFromStrings(opts.Paths)
ptr.paths.count = C.size_t(len(opts.Paths))
}
return ptr
}