blob: 6e369d584254ae57217c6e9e4fb612c5c9250db1 [file] [log] [blame]
// Copyright 2021 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// +build !build_with_native_toolchain
package main
import (
lib "fidl/fidl/test/bitsmemberadd"
"fmt"
)
// [START contents]
func useBits(bits lib.Flags) {
if bits.HasBits(lib.FlagsOptionA) {
fmt.Println("option C is set")
}
if bits.HasBits(lib.FlagsOptionB) {
fmt.Println("option C is set")
}
if bits.HasBits(lib.FlagsOptionC) {
fmt.Println("option C is set")
}
if bits.HasUnknownBits() {
fmt.Printf("unknown options: 0x%x", bits.GetUnknownBits())
}
}
// [END contents]
func main() {}